Matthias Clasen
7cb7e0ab35
gl: Add a private way to query mipmap status
...
Make GdkGLTexture determine if the texture has
a mipmap, and provide private API to query this
information.
This check is done in gdkgltexture.c instead of
gskgldriver.c, since we're already binding the
texture here for other reasons, so it is easy
to query a few more things.
2023-03-23 23:16:54 -04:00
Matthias Clasen
4291f27b56
gltexture: Try harder to determine the format
...
We can query these things as long as the texture ID
is valid in the current context.
2023-03-23 22:56:06 -04:00
Emmanuele Bassi
9f4013c5b4
Merge branch 'fix-a11y-leak2' into 'main'
...
Don't leak all AT contexts
Closes #5690
See merge request GNOME/gtk!5700
2023-03-23 11:07:18 +00:00
Benjamin Otte
4e9369585d
Merge branch 'wip/otte/listview-cleanups' into 'main'
...
listview refactoring and new stuff
See merge request GNOME/gtk!5701
2023-03-23 05:38:29 +00:00
Benjamin Otte
30d4629043
columnview: Handle focus movement properly
...
- grab_focus() on a row (happens with scroll_to()) keeps the focus
column intact if possible.
- <Tab> and <Shift-Tab> move through the cells in order, and move
to the next row when at the end.
- <Up> an <Down> move to the next/prev row, keeping the same column
focused.
- <Left> and <Right> move to the prev/next cell, if one is available.
If not, they stay where they are.
2023-03-23 04:51:50 +01:00
Benjamin Otte
78e72ad1de
columnview: add a (private) focus-column
...
Make setting the focus column scroll to it, too.
2023-03-23 04:51:20 +01:00
Benjamin Otte
8e17abb8fe
columnviewrowwidget: Handle left/right arrow keys
...
Make it move focus just like GtkWindow would.
Otherwise the listview will (try to) handle it and move focus between
cells - which doesn't do anything for lists and only works with grids.
2023-03-23 04:45:03 +01:00
Benjamin Otte
fa7a5773d4
listbase: Only grab_focus() if the cursor moved
...
If there is no movement, grab_focus() on the already focused widget
just causes weird inconsistencies and we don't want those.
2023-03-23 04:45:03 +01:00
Benjamin Otte
7285830dfb
columnviewrow: Handle focus movement properly
...
Handle backwards tab properly and deal with left right arrows.
2023-03-23 04:45:03 +01:00
Benjamin Otte
817732ded9
listitemwidget: Only take a single child
2023-03-23 04:45:03 +01:00
Benjamin Otte
3a6bfe9e9d
columnviewrowwidget: Drop unneeded stuff
...
Also remove the GtkColumnListItemFactory and GtkColumnViewLayout
objects by folding them into GtkColumnViewRowWidget.
2023-03-23 04:45:03 +01:00
Benjamin Otte
bea7d5d318
columnview: Add GtkColumnViewRowWidget
...
This is a copy/paste of GtkListItemWidget for now.
Modifications will happen in future commits.
2023-03-23 04:45:03 +01:00
Benjamin Otte
608be08b0d
listview: Add private GtkListFactoryWidget
...
This is a split of GtkListItemWidget into the generic parts of factory
using widgets.
On top of it there's GtkListItemWidget, which takes care of GtkListItem.
2023-03-23 04:45:03 +01:00
Benjamin Otte
107133ec6d
listview: Move ::factory out of the item manager
...
It's a listitemwidget property, and the item manager manages the items,
not the widgets.
2023-03-23 04:45:03 +01:00
Benjamin Otte
4ecda13fbd
listview: Move ::single-click-activate out of the item manager
...
It's a listitemwidget property, and the item manager manages the items,
not the widgets.
2023-03-23 04:45:03 +01:00
Benjamin Otte
ccacf80f47
listitemmanager: Create widgets via vfunc
...
We now have listitemmanager just create GtkListItemBase objects via
vfunc and use them.
2023-03-23 04:45:03 +01:00
Benjamin Otte
1f3a2734eb
listitemwidget: split out GtkListItemBase
...
There's 2 reasons for this:
1. Adding a custom widget for columnview rows
2. Using this as base class for sections
2023-03-23 04:45:03 +01:00
Benjamin Otte
a18760a094
itemmananger: Remove the user data
...
Use the widget instead. They're the same anyway.
2023-03-23 04:45:03 +01:00
Benjamin Otte
e85270b051
listbase: Privatize 2 functions
...
They're not used outside of GtkListBase, so no use to have them in the
header.
Requires moving one function up in the source now that the forward
declaration is missing.
2023-03-23 04:45:03 +01:00
Benjamin Otte
27c01cfa49
listitemmanager: Clean up header
...
Remove all unused functions and an unused macro.
2023-03-23 04:45:03 +01:00
Matthias Clasen
7b22983be5
Don't leak all AT contexts
...
create_at_context was confused - it stored a reference
to the newly created context in priv->context, but then
also returned a reference, and the caller stored that
in priv->context again.
Change it to only return a reference.
Fixes : #5690
2023-03-22 23:41:40 -04:00
Matthias Clasen
57ec758d81
Merge branch 'texture-scale-test' into 'main'
...
gsk: Add a test for scaled textures
See merge request GNOME/gtk!5686
2023-03-23 02:42:28 +00:00
Bruce Cowan
2ab3610df8
Update British English translation
...
(cherry picked from commit d80cecec06
)
2023-03-22 15:46:23 +00:00
Matthias Clasen
724ecf3b51
Merge branch 'ebassi/ensure-file-chooser-types' into 'main'
...
Ensure GtkFileChooserCell's type
See merge request GNOME/gtk!5696
2023-03-22 10:48:55 +00:00
Emmanuele Bassi
b2e8158c7a
Ensure GtkFileChooserCell's type
...
Otherwise anything that dlopen()'s GTK will have a bad day.
See: https://discourse.gnome.org/t/strange-filechooserdialog-behaviour-in-gtk-4-10/14435
2023-03-22 10:29:57 +00:00
Matthias Clasen
9dcc1943b3
gsk: Improve slice handling
...
Upload slices in chunks, instead of copying
enormous amounts of memory.
2023-03-22 00:15:32 -04:00
Matthias Clasen
c3ee8d2699
gsk: Add more flexible texture upload
...
Add a command queue function to create a
GL texture by uploading several GdkTextures
at given positions.
This lets us 'piece together' textures.
2023-03-22 00:15:04 -04:00
Matthias Clasen
24720307bb
gsk: Tweak one test to pass
...
Clip away the problematic corners in this
artificial texture scaling test. The GL renderer
has problems getting them perfect.
2023-03-22 00:15:04 -04:00
Matthias Clasen
50969d7923
gsk: Drop debug code
2023-03-22 00:15:04 -04:00
Matthias Clasen
5de8e9ec6e
gsk: Drop some unused arguments
...
All callers of the slice apis pass 0 for
min_rows and min_cols. So just drop these.
2023-03-22 00:14:43 -04:00
Matthias Clasen
d1fc44d3a6
gsk: Use overlapping slices
...
Store texture coordinates for each slice
instead of assuming 0,0,1,1, and generate
overlapping slices to allow for proper mipmaps.
This almost fixes trilinear filtering with
sliced textures.
2023-03-22 00:14:43 -04:00
Matthias Clasen
61b9be1c1a
gsk: Add a test for scaled textures
...
GL and cairo disagree on this one, and have forever.
Whee!
2023-03-22 00:14:16 -04:00
Matthias Clasen
8f73a7c690
gsk: Cosmetics
2023-03-22 00:14:16 -04:00
Matthias Clasen
c237957ef0
Merge branch 'matthiasc/for-main' into 'main'
...
a11y: Add a test for gtk_accessible_role_to_name
See merge request GNOME/gtk!5694
2023-03-22 00:24:52 +00:00
Matthias Clasen
d04690d05c
a11y: Add a test for gtk_accessible_role_to_name
...
This should prevent !5693 from happening again
in the future.
2023-03-21 20:06:37 -04:00
Matthias Clasen
f8bfb5fec2
Merge branch 'fix_gtk_accessible_role_to_name_crash' into 'main'
...
fix crash with gtk_accessible_role_to_name and GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON
See merge request GNOME/gtk!5693
2023-03-21 18:05:50 +00:00
Caolán McNamara
2a78734aef
fix crash with gtk_accessible_role_to_name and GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON
...
presumably since:
commit de80f503e4
Date: Thu Feb 23 14:22:20 2023 +0100
a11y: Introduce a dedicated role for toggle buttons
2023-03-21 15:04:12 +00:00
Benjamin Otte
ee6aae93d5
Merge branch 'wip/otte/for-main' into 'main'
...
checkbutton: Only andle arrow focus if we're in a group
See merge request GNOME/gtk!5692
2023-03-21 13:26:09 +00:00
Benjamin Otte
fb2a17a972
testsuite: Add a treelistmodel test
...
This one exhaustively tests reusing the same model as a child model for
many nodes.
This tracks that multiple items-changed signals emitted at the same time
(or multiple handlers for one such signal) doesn't put the treelistmodel
in an inconsistent state while it is handling all of them.
I'm not sure this (ab)use of treelistmodel should be officially
supported, but it works today, so let's test it to see if we can keep it
working.
2023-03-21 14:10:17 +01:00
Benjamin Otte
1c64438b12
checkbutton: Only andle arrow focus if we're in a group
...
If there is no other widget in the group that we can focus, don't focus
and activate ourselves.
Otherwise the arrow keys on checkbuttons toggle the checkbutton.
2023-03-21 14:10:17 +01:00
Matthias Clasen
634bea777f
Merge branch 'disabled-picture-opacity-fix' into 'main'
...
theme: Use 0.5 opacity for disabled pictures
Closes #5683
See merge request GNOME/gtk!5689
2023-03-20 23:06:44 +00:00
Marco Trevisan (Treviño)
a2076dd537
theme: Use 0.5 opacity for disabled pictures
...
If a GtkImage is using an icon we use a gtk-icon-filter to se the icon
opacity when in insensitive state, however when using other kinds of
pictures we do not apply the same style leading to an inconsistent
result.
Closes : #5683
2023-03-20 23:46:08 +01:00
Matthias Clasen
75f9379cd5
Merge branch 'alatiera/fedora-bump' into 'main'
...
ci: Use Fedora 38 as the base
See merge request GNOME/gtk!5688
2023-03-20 14:39:15 +00:00
Jordan Petridis
f9b2d3104a
vulkan: Update error codes enum
2023-03-20 16:16:30 +02:00
Jordan Petridis
679657cc0f
ci: Use Fedora 38 as the base
2023-03-20 16:16:24 +02:00
Matthias Clasen
d712bdcd6d
Merge branch 'bilelmoussaoui-main-patch-49195' into 'main'
...
g-i: Add since annotation to GdkSurfaceSize
See merge request GNOME/gtk!5687
2023-03-20 11:23:21 +00:00
Bilal Elmoussaoui
aa0cd3a553
g-i: Add since annotation to GdkSurfaceSize
2023-03-20 08:14:25 +00:00
Matthias Clasen
244d36d3f4
Merge branch 'mipmap-more' into 'main'
...
gsk: Use mipmaps when it is beneficial
See merge request GNOME/gtk!5685
2023-03-20 02:04:21 +00:00
Matthias Clasen
a19cf02b16
gsk: Use mipmaps when it is beneficial
...
If a texture node ends up getting scaled
down a lot, it helps to use trilinear filtering.
2023-03-19 21:45:30 -04:00
Benjamin Otte
56b904f1e6
Merge branch 'wip/otte/for-main' into 'main'
...
treelistmodel: Clear item in right place
Closes #5681
See merge request GNOME/gtk!5682
2023-03-19 17:07:53 +00:00