Commit Graph

37065 Commits

Author SHA1 Message Date
Matthias Clasen
04a51837f7 atspi: Emit bounds-changed
This is using the new bounds_change vfunc in GtkATContext.
2020-10-19 12:19:55 -04:00
Matthias Clasen
75a0bef921 widget: Mark the size as changed when it changes
This notifies the AT context that the widgets size
has changed.
2020-10-19 12:19:55 -04:00
Matthias Clasen
d50ebd947c a11y: Add bounds change api
Add a way for GTK to pass bounds change information
to the AT context.
2020-10-19 12:19:55 -04:00
Matthias Clasen
8e4f8a45a9 atspi: Implement Component
Implement the non-questionable parts of the Component interface
for accessibles which are widgets.

This does not include:
 - global coordinates
 - setters
 - scrolling
 - alpha, layers, zorder, and the like
2020-10-19 12:19:55 -04:00
Matthias Clasen
3ad03b1706 a11y: Add a separate vfunc for platform changes
The state_change vfunc is becoming unwieldy. Lets move
the platform changes to their own vfunc, as a start.
2020-10-19 12:09:08 -04:00
Matthias Clasen
dfe00c4ac4 atspi: Be more careful
We have non-widget accessibles now, so guard against
change notification being emitted on them.
2020-10-19 12:09:08 -04:00
Matthias Clasen
5bb656af4c Cosmetics
Add some more fold markers.
2020-10-19 12:08:47 -04:00
Matthias Clasen
469b913cdf Cosmetics 2020-10-19 12:00:53 -04:00
Matthias Clasen
9c1c8a554a Cosmetics 2020-10-19 11:46:25 -04:00
Matthias Clasen
2359510b1f Merge branch 'matthiasc/for-master' into 'master'
Various columnview fixes

Closes #3265, #3272, and #3276

See merge request GNOME/gtk!2717
2020-10-19 15:00:17 +00:00
Sophie Herold
33f0809784 Add nullable return annotations in GtkAboutDialog 2020-10-19 13:46:32 +00:00
Matthias Clasen
81ee273e98 columnview: Make right-aligned content work
Make right-aligned content work in resized columns.
There is currently no way to make a title right-aligned,
but we can still make it work correctly. This is a follow
up to 7eb0ae39c5.

Fixes: #3276
2020-10-19 09:39:07 -04:00
Matthias Clasen
f3fe1812aa Adwaita: Put column separators on the left
When resizing columns, we clip a shrunk column
on the right, so the separator disappears in that
case unless we put it on the left side of the other
column.
2020-10-19 09:39:05 -04:00
Matthias Clasen
25d0fb4c76 columview: Make resize area a bit larger
This make column resizing feel less like a game
of hit-and-miss. Ultimatively, we should add an
alternative to this.
2020-10-19 08:31:37 -04:00
Matthias Clasen
98b66acbdd columview: Implement double-click to reset headers
Implement the same behavior as GtkTreeView:
double-click on the header boundary resets the
header to its automatic width.

Fixes: #3272
2020-10-19 08:31:37 -04:00
Matthias Clasen
1976df1e54 columnview: Make resize cursors reliable
Ensure that the column resize cursor stays in place
for the duration of the resize drag. This is a bit
annoying, since the implicit grab can end up on the
header of a different column from the one we are
resizing, so just set the cursor on all column headers.
2020-10-19 08:30:22 -04:00
Matthias Clasen
39baf4fff4 columnview: Fix more issues with column resizing
Make it so that for overlapping resize rectangles (with
very narrow columns), we prefer the narrow column, so you
can regrow a column after shrinking it all the way.

Related: #3274
2020-10-19 08:30:05 -04:00
Matthias Clasen
a88e5a5f4e columnview: Fix some issues with column resizing
Ensure that we place the resize rectangle at the visible
right edge of the column, not where the allocation ends
(we clip the header drawing, after all).

Related: #3274
2020-10-19 08:29:29 -04:00
Matthias Clasen
a39e519bed inspector: Clear overlays on unroot
In dispose(), we can't access the root anymore,
since we're already unrooted.

Fixes: #3265
2020-10-17 13:11:58 -04:00
Sophie Herold
cd0bef9390 Add some missing nullable return annotations 2020-10-17 15:32:36 +02:00
Matthias Clasen
34625142f4 docs: Expand opacity docs
Explain the situation with popovers and opacity.

Fixes: #3246
2020-10-15 22:39:01 -04:00
Matthias Clasen
6cbf1d0379 Merge branch 'a11y-action-fixes' into 'master'
A11y action fixes

See merge request GNOME/gtk!2703
2020-10-16 02:19:08 +00:00
Matthias Clasen
8eb6e876bd Revert "listbox: Activate single-click rows if n_press >= 1"
This reverts commit e669433cde.

This broke selection in several listbox examples.

Fixes: #3263
2020-10-15 21:46:58 -04:00
Matthias Clasen
ab61b7b9ae atspi: Properly filter out parent actions
We only want to show relevant, local actions for
widgets, but _gtk_widget_get_action_muxer() will
return the muxer of a parent widget (all the way
up to the toplevel), if the widget does not have
any actions of its own. To detect this situation,
compare what _gtk_widget_get_action_muxer() returns
for the parent widget, and act accordingly.
2020-10-15 21:32:11 -04:00
Matthias Clasen
3eae91255d atspi: Fix a thinko in action filtering
get_action_at_index() was trying hard to find out
which actions are valid, only to then return the
invalid ones anyway.
2020-10-15 21:31:58 -04:00
Emmanuele Bassi
cfb327974b a11y: Add atspi.Action for GtkPasswordEntry 2020-10-16 00:34:01 +01:00
Emmanuele Bassi
a83d3078c2 Allow toggling the password entry visibility programmatically
We are going to need a method for toggling the visibility from the
accessibility layer.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
f67345eb55 a11y: Add atspi.Action for GtkEntry
We need to handle the activation on the entry widget, as well as the
activation of the primary and secondary icons.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
c10bcf0a60 Add GtkEntry icon signals emitter
We need a (private) way to programmatically trigger the activation of
the entry's icons, so that we can call it from the accessibility layer.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
9ae08fc0f0 a11y: Add atspi.Action for GtkExpander 2020-10-16 00:34:01 +01:00
Emmanuele Bassi
5f1128899c a11y: De-duplicate some action code
The widgets with hard coded actions should share more code, instead of
copy-pasting it.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
e44f27a7ed a11y: Special case buttons and switches
These widgets have specific actions.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
374bd21340 Initial ATSPI Action implementation for widget
Use the actions from the GtkActionMuxer of each widget to populate the
list of actions available.
2020-10-16 00:34:01 +01:00
Matthias Clasen
4bd2595421 actionmuxer: Make it possible to enumerate local actions
This will be useful for exposing actions via the
AT-SPI Actions interface.

Update all callers.
2020-10-15 16:32:55 -04:00
Matthias Clasen
aa4c0bf272 spinbutton: Hide the buttons from accessibility
The buttons here are not really buttons (the action
is not tied to the "clicked" signal), so triggering
the buttons via a11y does not have the expected effect.

And we expose the Value interface that ATs can use
to set the value.
2020-10-15 16:32:55 -04:00
Matthias Clasen
4e04c39609 emojicompletion: Avoid a memory overrun
Don't read beyond the beginning of the string.

Fixes: #3245
2020-10-15 16:32:55 -04:00
Matthias Clasen
7d22616a0e Merge branch 'a11y-list-view-selection-fixes' into 'master'
atspi: Add fold markers

See merge request GNOME/gtk!2701
2020-10-15 17:36:47 +00:00
Matthias Clasen
8a14f019d0 atspi: Add fold markers
This makes it much easier to navigate in these
multi-implementation files.
2020-10-15 13:14:56 -04:00
Matthias Clasen
329efee643 Merge branch 'a11y-list-view-selection-fixes' into 'master'
A11y list view selection fixes

See merge request GNOME/gtk!2700
2020-10-15 17:10:00 +00:00
Matthias Clasen
bf58b6f88c Merge branch 'ebassi/for-master' into 'master'
GdkWayland API cleanups

Closes #3249

See merge request GNOME/gtk!2688
2020-10-15 16:55:19 +00:00
Matthias Clasen
8701e65635 atspi: Implement Selection more correctly
The Selection interface is defined in terms of child
positions, so we need to always translate from that
to model positions if we want to use the selection
model apis.
2020-10-15 12:46:52 -04:00
Matthias Clasen
5f22ad8848 Remove debug spew 2020-10-15 12:19:58 -04:00
Matthias Clasen
1d40f29776 wayland: Make gdk_wayland_device_pad_set_feedback private
It is not a generally useful api, and awkwardly named.
2020-10-15 12:00:00 -04:00
Matthias Clasen
6d1dcaa92a docs: Explain the symbolic icon paintable situation
Add a paragraph to the migration guide that explains
how to properly render symbolic GtkIconPaintables.

Also mention this in the GtkIconPaintable docs.

There's a reason you can't spell 'paintable' without
'pain'...
2020-10-15 11:42:50 -04:00
Matthias Clasen
9c28ecb0da Merge branch 'a11y/atspi' into 'master'
A11y/atspi

See merge request GNOME/gtk!2698
2020-10-15 14:59:24 +00:00
Matthias Clasen
8737692b2b atspi: Implement Selection for list views
This implementation works for both GtkListView and
GtkGridView, and by extension, also for GtkColumnView
and GtkDropDown, since those just use a list view
internally.
2020-10-15 08:35:06 -04:00
Matthias Clasen
c7bf33a3de columnview: Set accessible roles
Use the TREE_GRID, ROW, COLUMN_HEADER and GRID_CELL roles
for the various widgets involved in a GtkColumnView. To
enable this, we subclass GtkListView for the internal
list in the column view.
2020-10-15 00:16:25 -04:00
Matthias Clasen
6d562b6176 listview: Set accessible roles
Use the LIST and LIST_ITEM roles for GtkListView
and its children. Use the GRID and GRID_CELL roles
for GtkGridView and its children.
2020-10-14 23:34:51 -04:00
Matthias Clasen
1bf21d3dba Document accessible roles for stacks and notebooks
This was forgotten when I implemented the Tabs pattern.
2020-10-14 22:27:09 -04:00
Matthias Clasen
14640cec85 flowbox: Set accessible roles
Use the GRID and GRID_CELL roles for GtkFlowBox
and GtkFlowBoxChild.
2020-10-14 22:20:43 -04:00