1
0
mirror of https://gitlab.gnome.org/GNOME/gtk.git synced 2025-01-13 14:00:09 +00:00
Commit Graph

82872 Commits

Author SHA1 Message Date
Sergey Bugaev
a71bb2165e stack: Report constant-size in more cases
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2024-12-21 12:10:29 +03:00
Sergey Bugaev
ed8c457c3a layoutmanager: With wfh == hfw, prefer hfw
We generally much prefer height-for-width over width-for-height, since
the former is typically better supported and faster, and the latter is
known to cause issues, most notably with wrappable labels. So when we
have two children with differing preferences and so have to make an
arbitrary choice between the two, prefer height-for-width.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2024-12-21 12:10:29 +03:00
Sergey Bugaev
b7f078f739 layoutmanager: Skip invisible children when determining request mode
We don't generally care about hidden (or native) children when
performing layout, as is indeed suggested by the should_layout () method
name. Specifically for determining request mode, we'd like to return
constant size whenever we can, since this can result in very valueable
performance gains when measuring ancestor widgets. In case we have some
visible constant-size children and some hidden height-for-width ones,
we can still return constant-size.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2024-12-21 12:10:29 +03:00
Matthias Clasen
b97cca094c Merge branch 'accesskit-followups' into 'main'
Accesskit followups

See merge request 
2024-12-20 20:28:29 +00:00
Matthias Clasen
312baec71e Merge branch 'scrolled-window-constant-size' into 'main'
scrolledwindow: Report constant-size in more cases

See merge request 
2024-12-20 19:38:19 +00:00
Matthias Clasen
63372ec0de Cosmetic typo fix 2024-12-20 14:03:21 -05:00
Matthias Clasen
151cc72512 docs: Mention AccessKit in various places 2024-12-20 14:01:21 -05:00
Matthias Clasen
11ee911258 Forgotten commit 2024-12-20 13:56:50 -05:00
Matthias Clasen
dce67b837f Merge branch 'matthiasc/accesskit-non-newton' into 'main'
Add AccessKit AT context

See merge request 
2024-12-20 17:55:14 +00:00
Matthias Clasen
841c2feae3 Adapt to AccessKit api changes
There was a bit of churn from 0.12 to 0.14. Most notably,
accesskit_node_builder was replaced by accesskit_node.
2024-12-20 11:43:18 -05:00
Matthias Clasen
38d117647a Cosmetics: Tweak the formatting for help output
Format the output for GTK_A11Y=help in the same way as we
do for GSK_RENDERER=help.
2024-12-20 10:13:55 -05:00
Matthias Clasen
7049182848 build: Make the accesskit backend optional
The new meson option is (unsurprisingly) called 'accesskit',
and it is off by default for now.
2024-12-20 10:13:55 -05:00
Matt Campbell
eda8ca7009 Remove my insertion from the README 2024-12-20 10:13:55 -05:00
Matt Campbell
ab24a866a5 Fix after rebase 2024-12-20 10:13:55 -05:00
Matt Campbell
da2370bf54 Add the macOS-specific AccessKit setup code; fix compiler warnings 2024-12-20 10:13:55 -05:00
Matt Campbell
bb53bb2d30 Use the experimental Meson build system for accesskit-c 2024-12-20 10:13:55 -05:00
Matt Campbell
5c8ebaf126 Update my README addition to not point at the newton-prototype branch 2024-12-20 09:34:51 -05:00
Matt Campbell
06395dc6dc Get the AccessKit AT-SPI backend working; put the AccessKit context after the AT-SPI context 2024-12-20 09:34:51 -05:00
Matt Campbell
6537b52485 Remove a TODO comment for something that's already done 2024-12-20 09:34:51 -05:00
Matt Campbell
2a0e881909 AccessKit renamed the static text role to label 2024-12-20 09:34:51 -05:00
Matt Campbell
8827c31898 Support selectable GtkLabels 2024-12-20 09:34:51 -05:00
Matt Campbell
ead60afd7d Unrealize all AT contexts except the root when accessibility is deactivated 2024-12-20 09:34:51 -05:00
Matt Campbell
8ad892016c Add scrolling when the text view selection is updated 2024-12-20 09:34:51 -05:00
Matt Campbell
2c252337b1 Implement the SetTextSelection action for GtkTextView 2024-12-20 09:34:51 -05:00
Matt Campbell
3b7e955d30 Fix a logic error that caused unnecessary full tree updates 2024-12-20 09:34:51 -05:00
Matt Campbell
a8c32923b3 Ensure AccessKit action requests are handled on the main thread 2024-12-20 09:34:51 -05:00
Matt Campbell
292644d27b Fix a crash due to out-of-order updates 2024-12-20 09:34:51 -05:00
Matt Campbell
f8978346b9 Implement the SetTextSelection action for single-line editables 2024-12-20 09:34:51 -05:00
Matt Campbell
45ea186d52 Add basic action support 2024-12-20 09:34:51 -05:00
Matt Campbell
8d2fcaba8c fix compiler warnings 2024-12-20 09:34:51 -05:00
Matt Campbell
510e596794 GtkTextView: Tell the AT context that text content has updated when the whole buffer is changed 2024-12-20 09:34:51 -05:00
Matt Campbell
be7a23fa5e Tightly integrate tree updates with surface rendering, so there's always at least one tree update before each surface commit, as required by Newton, without the AccessKit context having to do extra surface commits itself. This should also prevent multiple tree updates per frame across platforms. 2024-12-20 09:34:51 -05:00
Matt Campbell
9131b28834 When unrealizing an AccessKit context, clear the single text view child ID if any 2024-12-20 09:34:51 -05:00
Matt Campbell
4af873ca8f Expose selection endpoints for GtkTextView 2024-12-20 09:34:51 -05:00
Matt Campbell
c719114879 Invalidate text layouts on bounds change 2024-12-20 09:34:51 -05:00
Matt Campbell
ebf636dbe0 Partial GtkTextView support; word wrap isn't yet reflected in the a11y tree 2024-12-20 09:34:51 -05:00
Matt Campbell
4a2748166f Reimplement the previous commit in a simpler way. Also avoid trying to do an update for an unmapped root widget, though ideally the root AT context should be unrealized. 2024-12-20 09:34:51 -05:00
Matt Campbell
f55e6e9c16 Work around the case where the focus (according to gtk_root_get_focus) is no longer attached to the root 2024-12-20 09:34:51 -05:00
Matt Campbell
0ec48f5166 Support getting the accessible name from tooltip text 2024-12-20 09:34:51 -05:00
Matt Campbell
2fae9775b1 Rework the layout traversal algorithm to take into account that line->length doesn't include line breaks 2024-12-20 09:34:51 -05:00
Matt Campbell
377f089dcb Don't destroy the contexts hash table in deactivate_accessibility. 2024-12-20 09:34:51 -05:00
Matt Campbell
56616a3b98 Fix build issues on Linux 2024-12-20 09:34:51 -05:00
Matt Campbell
1d7a091f90 Clear cached text layout state when unrealizing an AccessKit AT context 2024-12-20 09:34:51 -05:00
Matt Campbell
f69739a96a I think I got GtkText-based editable widgets fully working. The only doubt is whether the GtkText child is always added to the tree update before the editable parent 2024-12-20 09:34:51 -05:00
Matt Campbell
23a14d86fd Fix inconsistent naming 2024-12-20 09:34:51 -05:00
Matt Campbell
f00c5a9a46 Fix a couple of mistakes in deactivate_accessibility 2024-12-20 09:34:51 -05:00
Matt Campbell
da1b9be431 Switch to a GArray for the update queue, for more compact storage and cache-friendly traversal, and so items can be efficiently added to the end 2024-12-20 09:34:51 -05:00
Matt Campbell
993520ed06 Use the g_array_index macro to access GArray items 2024-12-20 09:34:51 -05:00
Matt Campbell
20dddac284 Correct the computation of previous/next-on-line IDs to use USV offsets 2024-12-20 09:34:51 -05:00
Matt Campbell
253b8b496c Use USV (GTK "character") offsets as the basis for run node IDs, not byte offsets 2024-12-20 09:34:51 -05:00