gtk4.git
2 years agodragsurface: Add compute-size signal
Ivan Molodetskikh [Sun, 5 Mar 2023 18:14:56 +0000 (10:14 -0800)]
dragsurface: Add compute-size signal

Similarly to GdkToplevel, GdkDragSurface's compute-size should be called
by backends to query the current surface size, and should be connected
to by widget implementations (like GtkDragIcon) to report the current
size.

GdkDragSurface-backed widgets are not parented to an existing widget,
unlike popovers, and like toplevels. This means that there's nobody to
actively call gdk_drag_surface_present() to update the size, and
GdkDragSurface should do it on its own, just like GdkToplevel.

2 years agoAdd GdkDragSurfaceSize
Matthias Clasen [Wed, 8 Mar 2023 19:01:10 +0000 (14:01 -0500)]
Add GdkDragSurfaceSize

This helper type will be used in the next commit for a new compute-size
request on GdkDragSurface. It is analogous in spirit to GdkToplevelSize.

2 years agotests: Add resizing drag icon test
Ivan Molodetskikh [Tue, 7 Mar 2023 04:19:31 +0000 (20:19 -0800)]
tests: Add resizing drag icon test

The test can verify that dynamic drag icon resizing and hotspot
adjustment work as intended.

2 years agoMerge branch 'add_visited_state' into 'main'
Matthias Clasen [Wed, 15 Mar 2023 01:24:18 +0000 (01:24 +0000)]
Merge branch 'add_visited_state' into 'main'

a11y: Add GTK_ACCESSIBLE_STATE_VISITED

See merge request GNOME/gtk!5616

2 years agoUpdate Russian translation
Aleksandr Melman [Tue, 14 Mar 2023 20:47:29 +0000 (20:47 +0000)]
Update Russian translation

2 years agoMerge branch 'drop-gslice' into 'main'
Matthias Clasen [Tue, 14 Mar 2023 19:22:28 +0000 (19:22 +0000)]
Merge branch 'drop-gslice' into 'main'

Drop gslice

See merge request GNOME/gtk!5634

2 years agoinspector: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:31:01 +0000 (06:31 -0500)]
inspector: Stop using g_slice

2 years agocss: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 12:09:40 +0000 (07:09 -0500)]
css: Stop using g_slice

2 years agotests: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:53:53 +0000 (06:53 -0500)]
tests: Stop using g_slice

2 years agotestsuite: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:52:56 +0000 (06:52 -0500)]
testsuite: Stop using g_slice

2 years agomodules: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:51:04 +0000 (06:51 -0500)]
modules: Stop using g_slice

2 years agogtk: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 12:10:51 +0000 (07:10 -0500)]
gtk: Stop using g_slice

2 years agogsk: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:48:49 +0000 (06:48 -0500)]
gsk: Stop using g_slice

2 years agogdk: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:41:41 +0000 (06:41 -0500)]
gdk: Stop using g_slice

2 years agomacos: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:33:36 +0000 (06:33 -0500)]
macos: Stop using g_slice

2 years agowin32: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:31:58 +0000 (06:31 -0500)]
win32: Stop using g_slice

2 years agox11: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:28:46 +0000 (06:28 -0500)]
x11: Stop using g_slice

2 years agoCODING-STYLE: Drop mention of g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:24:58 +0000 (06:24 -0500)]
CODING-STYLE: Drop mention of g_slice

2 years agoMerge branch 'wip/exalm/boxed-list' into 'main'
Matthias Clasen [Tue, 14 Mar 2023 18:54:54 +0000 (18:54 +0000)]
Merge branch 'wip/exalm/boxed-list' into 'main'

theme: Port .boxed-list style from libadwaita

See merge request GNOME/gtk!4806

2 years agoMerge branch 'wip/hadess/children-left-msg' into 'main'
Benjamin Otte [Tue, 14 Mar 2023 16:31:44 +0000 (16:31 +0000)]
Merge branch 'wip/hadess/children-left-msg' into 'main'

gtk: Fix "children left" warning with fatal warnings

See merge request GNOME/gtk!5652

2 years agotheme: Port .boxed-list style from libadwaita
Alexander Mikhaylenko [Thu, 9 Jun 2022 18:42:45 +0000 (22:42 +0400)]
theme: Port .boxed-list style from libadwaita

Consistently use it for boxed lists in inspector and gtk-demo.

Fixes issues like https://gitlab.gnome.org/GNOME/gtk/-/issues/3145

2 years agogtk: Fix "children left" warning with fatal warnings
Bastien Nocera [Tue, 14 Mar 2023 15:00:47 +0000 (16:00 +0100)]
gtk: Fix "children left" warning with fatal warnings

When fatal warnings were turned on, the developer would never see which
widgets were left as children to the widget that triggered the warning as
those were printed in separate g_warning calls.

Print a single warning with all the info so runs with fatal warnings
aren't left without any info.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Tue, 14 Mar 2023 15:33:20 +0000 (15:33 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Start 4.12 development

See merge request GNOME/gtk!5651

2 years agoStart 4.12 development
Matthias Clasen [Tue, 14 Mar 2023 12:21:35 +0000 (08:21 -0400)]
Start 4.12 development

2 years agoUpdate Slovenian translation
Martin [Tue, 14 Mar 2023 12:43:31 +0000 (12:43 +0000)]
Update Slovenian translation

2 years agoPost-release version bump
Matthias Clasen [Tue, 14 Mar 2023 12:16:30 +0000 (08:16 -0400)]
Post-release version bump

2 years ago4.10.1
Matthias Clasen [Mon, 13 Mar 2023 14:58:58 +0000 (15:58 +0100)]
4.10.1

2 years agoUpdated Spanish translation
Daniel [Tue, 14 Mar 2023 11:43:00 +0000 (12:43 +0100)]
Updated Spanish translation

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Tue, 14 Mar 2023 05:30:17 +0000 (05:30 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gsk: Mark mask nodes as 'supports transforms'

See merge request GNOME/gtk!5650

2 years agocss: Small speedups
Matthias Clasen [Mon, 13 Mar 2023 21:20:12 +0000 (22:20 +0100)]
css: Small speedups

2 years agoicontheme: Silence a compiler warning
Matthias Clasen [Mon, 13 Mar 2023 21:19:51 +0000 (22:19 +0100)]
icontheme: Silence a compiler warning

2 years agotests: Add more tests for texture scale nodes
Matthias Clasen [Mon, 13 Mar 2023 17:20:02 +0000 (18:20 +0100)]
tests: Add more tests for texture scale nodes

2 years agogsk: Mark mask nodes as 'supports transforms'
Matthias Clasen [Mon, 13 Mar 2023 17:10:53 +0000 (18:10 +0100)]
gsk: Mark mask nodes as 'supports transforms'

Just like blur nodes, the renderer can handle
these without creating an extra offscreen.

2 years agoMerge branch 'fix-texture-scale-rotation' into 'main'
Matthias Clasen [Tue, 14 Mar 2023 05:08:37 +0000 (05:08 +0000)]
Merge branch 'fix-texture-scale-rotation' into 'main'

gtk4-demo: Polish the image scaling demo

See merge request GNOME/gtk!5649

2 years agoMerge branch 'bilelmoussaoui-main-patch-31679' into 'main'
Benjamin Otte [Tue, 14 Mar 2023 05:03:13 +0000 (05:03 +0000)]
Merge branch 'bilelmoussaoui-main-patch-31679' into 'main'

GLTexture: Add GL_RGB format support

See merge request GNOME/gtk!5647

2 years agogsk: Fix rotated texture scale nodes
Matthias Clasen [Mon, 13 Mar 2023 16:59:04 +0000 (17:59 +0100)]
gsk: Fix rotated texture scale nodes

This was causing us to render rotated texture scale
nodes to an unclipped offscreen, bringing 'giant
intermediate texture' problems back.

2 years agogtk4-demo: Add a tooltip to image scaling
Matthias Clasen [Mon, 13 Mar 2023 15:54:22 +0000 (16:54 +0100)]
gtk4-demo: Add a tooltip to image scaling

Show some information about the values.

2 years agogtk4-demo: Polish the image scaling demo
Matthias Clasen [Mon, 13 Mar 2023 12:10:52 +0000 (13:10 +0100)]
gtk4-demo: Polish the image scaling demo

Make the scale binding bidirectional again, fix up
the ranges and the sensitivity of the actions, and
add a mark for the unscaled position.

2 years agoUpdate German translation
Jürgen Benvenuti [Mon, 13 Mar 2023 18:30:32 +0000 (18:30 +0000)]
Update German translation

2 years agoGLTexture: Add GL_RGB format support
Bilal Elmoussaoui [Mon, 13 Mar 2023 13:59:17 +0000 (13:59 +0000)]
GLTexture: Add GL_RGB format support

2 years agoMerge branch 'more-scaled-texture-fixes' into 'main'
Matthias Clasen [Mon, 13 Mar 2023 08:58:58 +0000 (08:58 +0000)]
Merge branch 'more-scaled-texture-fixes' into 'main'

Fix gtk_snapshot_append_scaled_texture

See merge request GNOME/gtk!5638

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Mon, 13 Mar 2023 07:55:52 +0000 (07:55 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gtk4-demo: Fix rotation handling in image scaling

See merge request GNOME/gtk!5643

2 years agogtk4-demo: Use gtk_snapshot_append_scaled_texture
Matthias Clasen [Mon, 13 Mar 2023 07:54:13 +0000 (08:54 +0100)]
gtk4-demo: Use gtk_snapshot_append_scaled_texture

2 years agoFix gtk_snapshot_append_scaled_texture
Matthias Clasen [Fri, 10 Mar 2023 23:50:40 +0000 (00:50 +0100)]
Fix gtk_snapshot_append_scaled_texture

This was doing the wrong thing with transforms.

2 years agodocs: Details about texture scale nodes
Matthias Clasen [Mon, 13 Mar 2023 07:38:58 +0000 (08:38 +0100)]
docs: Details about texture scale nodes

Add some more details about filtering, to
clarify things a bit.

2 years agogtk4-demo: Scale logarithmically in image scaling
Matthias Clasen [Mon, 13 Mar 2023 07:21:10 +0000 (08:21 +0100)]
gtk4-demo: Scale logarithmically in image scaling

2 years agogtk4-demo: Fix rotation handling in image scaling
Matthias Clasen [Mon, 13 Mar 2023 07:11:29 +0000 (08:11 +0100)]
gtk4-demo: Fix rotation handling in image scaling

We weren't sizing the widget correctly in rotated
cases.

2 years agoUpdate Portuguese translation
Hugo Carvalho [Mon, 13 Mar 2023 00:06:26 +0000 (00:06 +0000)]
Update Portuguese translation

2 years agoUpdate Galician translation
Fran Dieguez [Sun, 12 Mar 2023 23:19:49 +0000 (23:19 +0000)]
Update Galician translation

2 years agoUpdate Lithuanian translation
Aurimas Černius [Sun, 12 Mar 2023 20:01:39 +0000 (20:01 +0000)]
Update Lithuanian translation

2 years agoUpdate Bulgarian translation
Alexander Shopov [Sun, 12 Mar 2023 18:36:38 +0000 (18:36 +0000)]
Update Bulgarian translation

2 years agoUpdated Danish translation
Ask Hjorth Larsen [Sun, 12 Mar 2023 15:24:18 +0000 (16:24 +0100)]
Updated Danish translation

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 12 Mar 2023 10:20:04 +0000 (10:20 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gtk-demo: Add rotation to the scaling demo

Closes #5659

See merge request GNOME/gtk!5641

2 years agoUpdate Basque translation
Asier Sarasua Garmendia [Sun, 12 Mar 2023 09:35:14 +0000 (09:35 +0000)]
Update Basque translation

2 years agocolumnview: Be more defensive
Matthias Clasen [Sun, 12 Mar 2023 07:23:16 +0000 (08:23 +0100)]
columnview: Be more defensive

I am not sure how we can have no listitem here,
but better to be safe than sorry.

Fixes: #5659
2 years agogtk-demo: Add rotation to the scaling demo
Matthias Clasen [Sat, 11 Mar 2023 17:56:08 +0000 (18:56 +0100)]
gtk-demo: Add rotation to the scaling demo

Closing in on eog :)

2 years agoUpdate Turkish translation
Sabri Ünal [Sat, 11 Mar 2023 16:03:32 +0000 (16:03 +0000)]
Update Turkish translation

2 years agoUpdate Swedish translation
Anders Jonsson [Sat, 11 Mar 2023 15:47:38 +0000 (15:47 +0000)]
Update Swedish translation

2 years agoUpdate Polish translation
Piotr Drąg [Sat, 11 Mar 2023 14:14:42 +0000 (15:14 +0100)]
Update Polish translation

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 11 Mar 2023 11:56:23 +0000 (11:56 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

inspector: Force a full redraw for debug nodes

See merge request GNOME/gtk!5640

2 years agoinspector: Force a full redraw for debug nodes
Matthias Clasen [Sat, 11 Mar 2023 11:30:44 +0000 (12:30 +0100)]
inspector: Force a full redraw for debug nodes

Without this, debug nodes randomly are missing
in the tree, where we are reusing older render
nodes.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 11 Mar 2023 10:21:13 +0000 (10:21 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

themes: Avoid ':' in custom target names

Closes #5280

See merge request GNOME/gtk!5639

2 years agothemes: Avoid ':' in custom target names
Matthias Clasen [Sat, 11 Mar 2023 10:03:43 +0000 (11:03 +0100)]
themes: Avoid ':' in custom target names

For whatever reason, meson decides to use custom
target names in the file system, and on Windows,
the ':' is causing trouble here. So avoid it.

Fixes: #5280
2 years agoUpdate Czech translation
Marek Černocký [Sat, 11 Mar 2023 08:52:49 +0000 (08:52 +0000)]
Update Czech translation

2 years agoUpdate Georgian translation
Ekaterine Papava [Sat, 11 Mar 2023 05:39:09 +0000 (05:39 +0000)]
Update Georgian translation

2 years agoMerge branch 'wip/otte/rendernode-export' into 'main'
Benjamin Otte [Sat, 11 Mar 2023 00:26:18 +0000 (00:26 +0000)]
Merge branch 'wip/otte/rendernode-export' into 'main'

rendernode: Register SVG serializer

See merge request GNOME/gtk!5637

2 years agoUpdate Hungarian translation
Balázs Úr [Fri, 10 Mar 2023 23:47:38 +0000 (23:47 +0000)]
Update Hungarian translation

2 years agoMerge branch 'wip/x11-create-destroy-without-show-show-hide' into 'main'
Matthias Clasen [Fri, 10 Mar 2023 23:40:50 +0000 (23:40 +0000)]
Merge branch 'wip/x11-create-destroy-without-show-show-hide' into 'main'

x11/surface: Clear compute_size idle source also when destroying

See merge request GNOME/gtk!5636

2 years agoMerge branch 'cache-scaled-texture' into 'main'
Matthias Clasen [Fri, 10 Mar 2023 23:38:50 +0000 (23:38 +0000)]
Merge branch 'cache-scaled-texture' into 'main'

gsk: Cache scaled texture

Closes #5642

See merge request GNOME/gtk!5633

2 years agonode-editor: Add more export options
Benjamin Otte [Fri, 10 Mar 2023 21:58:19 +0000 (22:58 +0100)]
node-editor: Add more export options

Auto-detect tiff and svg and if those are chosen, save to that format.

2 years agorendernode: Register PNG serializer
Benjamin Otte [Fri, 10 Mar 2023 23:08:20 +0000 (00:08 +0100)]
rendernode: Register PNG serializer

This allows dropping or copy/pasting rendernodes into apps that accept
images.

2 years agogtk4-demo: Add tooltips to the menu demo
Matthias Clasen [Fri, 10 Mar 2023 23:07:07 +0000 (00:07 +0100)]
gtk4-demo: Add tooltips to the menu demo

Not great UI, but better than nothing.

2 years agoRename the menu demo
Matthias Clasen [Fri, 10 Mar 2023 23:03:05 +0000 (00:03 +0100)]
Rename the menu demo

At this point, the Menu demo is more about scaling images
than about menus, so rename it to Image Scaling.

2 years agorendernode: Register SVG serializer
Benjamin Otte [Fri, 10 Mar 2023 14:30:26 +0000 (15:30 +0100)]
rendernode: Register SVG serializer

This allows dropping or copy/pasting rendernodes into apps that accept
SVGs.

Not sure how useful this is because we advertise text/plain from
rendernodes already and we prefer that.

2 years agogtk-demo: Add a file chooser to the menu demo
Matthias Clasen [Fri, 10 Mar 2023 22:51:17 +0000 (23:51 +0100)]
gtk-demo: Add a file chooser to the menu demo

So we can try this with bigger images.

2 years agox11/surface: Clear compute_size idle source also when destroying
Jonas Ådahl [Fri, 10 Mar 2023 22:30:51 +0000 (23:30 +0100)]
x11/surface: Clear compute_size idle source also when destroying

Doing it on hide() is not enough, since in some edge cases we didn't
ever actually map, we just attempted to compute the size, e.g. in
response to a ConfigureNotify event, then the window was destroyed.

Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2678

2 years agogsk: Cache scaled texture
Matthias Clasen [Thu, 9 Mar 2023 11:35:07 +0000 (11:35 +0000)]
gsk: Cache scaled texture

Keep the texture we create for texture scale nodes.

Fixes: #5642
2 years agoUpdate Ukrainian translation
Yuri Chornoivan [Fri, 10 Mar 2023 19:24:32 +0000 (19:24 +0000)]
Update Ukrainian translation

2 years agoMerge branch 'wip/otte/filefilter-name' into 'main'
Benjamin Otte [Fri, 10 Mar 2023 17:11:25 +0000 (17:11 +0000)]
Merge branch 'wip/otte/filefilter-name' into 'main'

filefilter: If not given a name, deduce one

See merge request GNOME/gtk!5630

2 years agoUpdate Finnish translation
Jiri Grönroos [Fri, 10 Mar 2023 17:03:35 +0000 (17:03 +0000)]
Update Finnish translation

2 years agoMerge branch 'reverse-file-chooser-recent-files-sort-order' into 'main'
Matthias Clasen [Fri, 10 Mar 2023 16:40:50 +0000 (16:40 +0000)]
Merge branch 'reverse-file-chooser-recent-files-sort-order' into 'main'

filerchooser: Show Recent files in inverse order

See merge request GNOME/gtk!5625

2 years agoMerge branch 'wip/otte/listview-border-spacing' into 'main'
Matthias Clasen [Fri, 10 Mar 2023 16:39:05 +0000 (16:39 +0000)]
Merge branch 'wip/otte/listview-border-spacing' into 'main'

Implement CSS border-spacing support for listview and gridview

See merge request GNOME/gtk!5626

2 years agoMerge branch 'file-chooser-selectability2' into 'main'
Matthias Clasen [Fri, 10 Mar 2023 16:37:41 +0000 (16:37 +0000)]
Merge branch 'file-chooser-selectability2' into 'main'

file system model: Store selectability

See merge request GNOME/gtk!5582

2 years agoMerge branch 'notify_after_value_change' into 'main'
Matthias Clasen [Fri, 10 Mar 2023 16:36:41 +0000 (16:36 +0000)]
Merge branch 'notify_after_value_change' into 'main'

a11y: Notify assistive technologies when a GTK_ACCESSIBLE_PROPERTY_VALUE_NOW changes on a widget

See merge request GNOME/gtk!5624

2 years agoa11y: Notify assistive technologies when a GTK_ACCESSIBLE_PROPERTY_VALUE_NOW changes...
Lukáš Tyrychtr [Fri, 10 Mar 2023 16:36:39 +0000 (16:36 +0000)]
a11y: Notify assistive technologies when a GTK_ACCESSIBLE_PROPERTY_VALUE_NOW changes on a widget

This fixes silent sliders and similar controls when their value is changed.

2 years agofilefilter: If not given a name, deduce one
Benjamin Otte [Fri, 10 Mar 2023 15:12:00 +0000 (16:12 +0100)]
filefilter: If not given a name, deduce one

Otherwise we end up with a critical when cosntructing the GVariant and
the portal claims our filter is for "[Invalid UTF-8]".

Test included

2 years agogridview: Add border-spacing support
Benjamin Otte [Fri, 10 Mar 2023 04:16:25 +0000 (05:16 +0100)]
gridview: Add border-spacing support

omg, this is complicated code.

2 years agogridview: Introduce column size functions
Benjamin Otte [Thu, 9 Mar 2023 16:22:06 +0000 (17:22 +0100)]
gridview: Introduce column size functions

This is in preparation for border-spacing integration.

2 years agogridview: Use gtk_list_item_manager_get_nearest_tile()
Benjamin Otte [Thu, 9 Mar 2023 04:30:25 +0000 (05:30 +0100)]
gridview: Use gtk_list_item_manager_get_nearest_tile()

Simplifies gtk_grid_view_get_position_from_allocation() a bit because we
can omit the bounds shenanigan.

2 years agolistview: Support CSS border-spacing
Benjamin Otte [Thu, 9 Mar 2023 03:43:51 +0000 (04:43 +0100)]
listview: Support CSS border-spacing

Hopefully the code can deal with gaps between the tiles.

We use gtk_list_item_manager_get_nearest_tile() when necessary.

2 years agofilechooser: Set selectability for list items
Matthias Clasen [Fri, 10 Mar 2023 14:18:26 +0000 (15:18 +0100)]
filechooser: Set selectability for list items

We propagate this from the list items to the
GtkListItems. Twisty!

2 years agofilechooser: Dim non-selectable items
Matthias Clasen [Wed, 1 Mar 2023 17:01:15 +0000 (12:01 -0500)]
filechooser: Dim non-selectable items

2 years agocolumview: Propagate activatable and selectable
Matthias Clasen [Wed, 1 Mar 2023 17:00:26 +0000 (12:00 -0500)]
columview: Propagate activatable and selectable

When any of the cells is not activatable or selectable,
make the row not have those properties either.

2 years agofilechooser: Inform the model about selectability
Matthias Clasen [Wed, 1 Mar 2023 12:53:45 +0000 (07:53 -0500)]
filechooser: Inform the model about selectability

In folder modes, we don't want to select files.

2 years agofilesystemmodel: Store selectability
Matthias Clasen [Wed, 1 Mar 2023 12:53:07 +0000 (07:53 -0500)]
filesystemmodel: Store selectability

This will be used later on.

2 years agoMerge branch 'file-chooser-selection' into 'main'
Matthias Clasen [Fri, 10 Mar 2023 14:25:36 +0000 (14:25 +0000)]
Merge branch 'file-chooser-selection' into 'main'

filechooser: Don't automatically select a file

See merge request GNOME/gtk!5572

2 years agoUpdate Friulian translation
Fabio Tomat [Fri, 10 Mar 2023 07:49:25 +0000 (07:49 +0000)]
Update Friulian translation

2 years agolistitemmanager: Add gtk_list_item_manager_get_nearest_tile()
Benjamin Otte [Thu, 9 Mar 2023 03:42:45 +0000 (04:42 +0100)]
listitemmanager: Add gtk_list_item_manager_get_nearest_tile()

... and make the tile finding code use distance.

This also changes how gtk_list_item_manager_get_tile_at() finds the
right tile, so this is a custom commit for bisectability.

gtk_list_item_manager_get_nearest_tile() isn't used yet.

2 years agolistview: Move bounds check into base class
Benjamin Otte [Thu, 9 Mar 2023 03:02:22 +0000 (04:02 +0100)]
listview: Move bounds check into base class

This way, listview and gridview don't need to check if the rect is out
of bounds and nothing is selected, a quick rectangle_intersect() does
the job for them.

2 years agolistview: Return an allocation for unallcoated items
Benjamin Otte [Thu, 9 Mar 2023 02:34:01 +0000 (03:34 +0100)]
listview: Return an allocation for unallcoated items

Just get the position right and give them a height of 0px, that should
be good enough.

If we don't do that, code will think the item doesn't exist, which is
not what we want.