Commit Graph

75307 Commits

Author SHA1 Message Date
Danial Behzadi
fda2010a9e Update Persian translation
(cherry picked from commit f55cbf5643)
2023-03-18 01:10:52 +00:00
Matthias Clasen
ac799542ee Merge branch 'matthiasc/for-main' into 'main'
gtk-demo: Reset properties when the image changes

See merge request GNOME/gtk!5671
2023-03-17 16:32:28 +00:00
Matthias Clasen
060ab606a2 gtk-demo: Reset properties when the image changes 2023-03-17 11:49:57 -04:00
Matthias Clasen
a1c02161ba Merge branch 'texture-scale-slicing' into 'main'
gsk: Be more careful when slicing

Closes #5664

See merge request GNOME/gtk!5667
2023-03-17 15:44:07 +00:00
Matthias Clasen
3877a2e533 gsk: Drop texture subsetting
We don't do this for unfiltered textures either,
and with working slicing, it isn't needed.
2023-03-17 11:25:38 -04:00
Matthias Clasen
158facc2ca Merge branch 'broadway-disconnect-fix' into 'main'
broadway: Don't cause traffic when disconnecting

See merge request GNOME/gtk!5670
2023-03-17 15:14:44 +00:00
Matthias Clasen
88dd6e630e broadway: Don't cause traffic when disconnecting
The recently added transient-for support was causing
roundtrips when a client with transients disconnects,
leading to assertion failures. Avoid that.
2023-03-17 11:00:35 -04:00
Matthias Clasen
8d839c96d9 Merge branch 'fix-broadway-docs' into 'main'
docs: Update broadway docs

Closes #5662

See merge request GNOME/gtk!5669
2023-03-17 13:17:19 +00:00
Matthias Clasen
31ec095ec7 docs: Update broadway docs
Using Broadway without broadwayd hasn't worked since 2013...

Fixes: #5662
2023-03-17 09:00:10 -04:00
Matthias Clasen
b14a134a46 gsk: Add slicing to texture scale nodes
This makes it possible to use large textures
with filtering.

Fixes: #5664
2023-03-17 00:51:05 -04:00
Matthias Clasen
f3b0aa27ea gsk: Be more careful when slicing
We can only reuse existing slices if they
have the right filtering.
2023-03-17 00:50:01 -04:00
Benjamin Otte
fe2b6dd246 Merge branch 'wip/otte/for-main' into 'main'
Various fixes

Closes #5669

See merge request GNOME/gtk!5665
2023-03-17 00:37:52 +00:00
Benjamin Otte
565c9aed94 Merge branch 'gridview-filler-tile-fix' into 'main'
gridview: Fix condition for adding filler tiles

See merge request GNOME/gtk!5664
2023-03-16 23:50:13 +00:00
Benjamin Otte
9a4decc30f gldriver: Quick workaround for filter mismatch
We should really use texture views or samplers to handle this case for
shared textures, but this at least makes NEAREST not break.
2023-03-17 00:43:21 +01:00
Benjamin Otte
036f5816ac listitem: Claim sequence when handling an event
See my rants on IRC for why we definitely need to claim gestures by
default in GTK5.

Fixes #5669
2023-03-16 22:45:11 +01:00
Алексей Шилин
65b6150e78 gridview: Fix condition for adding filler tiles
Code above ensures that i is always in [0, n_columns - 1] range, so
the condition was always true, which resulted in filler tile always
being added to the grid. As the result, an empty row appeared at the
end of the grid if the number of columns divided the number of items.

Only add filler tile if last row is not full, i.e. when i > 0.
2023-03-17 00:21:09 +03:00
Matthias Clasen
664e3b737a Merge branch 'fix_next_accessible_sibling_after_refcounts' into 'main'
a11y: Fix the logic in gtk_accessible_get_next_accessible_sibling which decided whether we will use the overridden sibling on the context.

See merge request GNOME/gtk!5659
2023-03-16 21:12:20 +00:00
Matthias Clasen
428a2707b5 Merge branch 'label-file-links' into 'main'
label: Use GtkFileLauncher for file URI

Closes #5671

See merge request GNOME/gtk!5661
2023-03-16 21:07:29 +00:00
Benjamin Otte
fbc8bfb303 Merge branch 'wip/otte/for-main' into 'main'
Various small fixes

Closes #5380

See merge request GNOME/gtk!5662
2023-03-16 20:59:17 +00:00
Benjamin Otte
a0382ef495 listview: Fix culling issues when using CSS padding
We were culling children based on the content box, but clipping via
overflow happens on the padding box, so we need to use that one instead.

Fixes issues with items not being visible / disappearing in Nautilus
when they are near the border.

Resolves #5380
2023-03-16 21:40:02 +01:00
Benjamin Otte
ef3c515cf1 rowstrides are gsize, not int
gdk-pixbuf got that wrong, don't repeat that mistake.
2023-03-16 21:40:02 +01:00
Benjamin Otte
707c63c6f9 win32: Fix rowstride math 2023-03-16 21:40:02 +01:00
Matthias Clasen
18f91df7d8 label: Use GtkFileLauncher for file URI
The GtkUriLauncher calls into the openuri portal, which distinguishes
between files, directories, and URI. The GtkFileLauncher contains logic
to deal with this, because it can already handle the file and folder
differences.

If we have a file:// URI it's easier to create a GFile out of it, and
use the GtkFileLauncher API, while leaving the GtkUriLauncher API for
every other URI scheme.

Same fix as de3c1d0c73, for GtkLabel.

Fixes: #5671
2023-03-16 16:06:49 -04:00
Matthias Clasen
cf332e2efa Merge branch 'ebassi/issue-5671' into 'main'
linkbutton: Use GtkFileLauncher for file URI

Closes #5671

See merge request GNOME/gtk!5658
2023-03-16 16:51:29 +00:00
Lukáš Tyrychtr
3addbe23f3 Always drop the reference of the ATContext 2023-03-16 17:15:08 +01:00
Lukáš Tyrychtr
771b7d6caa a11y: Fix the logic in gtk_accessible_get_next_accessible_sibling which
decided whether we will use the overridden sibling on the context.
2023-03-16 15:16:32 +01:00
Emmanuele Bassi
de3c1d0c73 linkbutton: Use GtkFileLauncher for file URI
The GtkUriLauncher calls into the openuri portal, which distinguishes
between files, directories, and URI. The GtkFileLauncher contains logic
to deal with this, because it can already handle the file and folder
differences.

If we have a file:// URI it's easier to create a GFile out of it, and
use the GtkFileLauncher API, while leaving the GtkUriLauncher API for
every other URI scheme.

Fixes: #5671
2023-03-16 12:22:21 +00:00
Guillaume Bernard
bb88f69b20 Update French translation
(cherry picked from commit 904e6a03a5)
2023-03-16 10:24:37 +00:00
Matthias Clasen
d72a6167ed Merge branch 'max-texture-size' into 'main'
gsk: Add a way to limit texture sizes

See merge request GNOME/gtk!5656
2023-03-16 03:03:41 +00:00
Benjamin Otte
fc83d263ab Merge branch 'drag-gl-wayland-hotspot-fix' into 'main'
wayland: Reset pending offset in GL path

See merge request GNOME/gtk!5657
2023-03-15 23:36:44 +00:00
Ivan Molodetskikh
54e36f6b73 wayland: Reset pending offset in GL path
Otherwise GL surfaces that redraw without changing the hotspot have it
applied on top every frame and quickly slide away.

The cairo path and the X11 backend do not have this bug.
2023-03-15 16:11:40 -07:00
Ivan Molodetskikh
8d96b12cc7 testdndresize: Add non-resizing redrawing GL surface
The GL Wayland drag surface code path has a bug where it does not reset
the hotspot, so if a GL-backed draw surface redraws without resizing or
resetting the hotspot, it moves away. The next commit will fix that, but
this commit adds a test for that.
2023-03-15 16:09:51 -07:00
Matthias Clasen
d1256648f4 gsk: Use linear filtering for sliced textures
We use linear for unsliced textures, so we need
to do the same for sliced ones.
2023-03-15 17:50:01 -04:00
Matthias Clasen
2322fecf3b gsk: Fix texture slicing
We were just returning NULL for slices
here, which wasn't the intention.
2023-03-15 15:45:01 -04:00
Matthias Clasen
2e2c41cef6 gsk: Fix handling of large textures
When the texture is too large, actually
shrink the size to max_texture_size.
2023-03-15 15:33:32 -04:00
Matthias Clasen
895d427c6a gsk: Add a way to limit texture sizes
Allow to set max texture size using the
GSK_MAX_TEXTURE_SIZE environment variable.

We only allow to lower the max (for obvious
reasons), and we don't allow values smaller
than 512 (since our atlases use that size).
2023-03-15 14:35:57 -04:00
Matthias Clasen
c2965aed35 Merge branch 'dragsurface-resize' into 'main'
Fix drag surfaces ignoring size updates on Wayland and X11

See merge request GNOME/gtk!5597
2023-03-15 02:59:19 +00:00
Ivan Molodetskikh
11d9bbfd6e x11/surface: Get current drag surface size with compute-size signal
Query and update size of drag surfaces, similarly to how it's done for
the Wayland backend in the previous commit.
2023-03-14 19:41:44 -07:00
Ivan Molodetskikh
f63fc91b0e wayland/dragsurface: Get current size with compute-size signal
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.

This commit implements this for the Wayland backend.
2023-03-14 19:41:44 -07:00
Ivan Molodetskikh
e041646bfc dragicon: Handle compute-size
Compute our size when requested by the backend. This makes GtkDragIcons
actually recompute their size when it changes, instead of getting stuck
with the first size and potentially underallocating.
2023-03-14 19:41:44 -07:00
Ivan Molodetskikh
c3dde05d33 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.
2023-03-14 19:41:44 -07:00
Matthias Clasen
45434d501c 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.
2023-03-14 19:41:44 -07:00
Matthias Clasen
b74d483f01 Merge branch 'matthiasc/for-main' into 'main'
gl: Print max texture size in debug output

See merge request GNOME/gtk!5654
2023-03-15 02:32:37 +00:00
Ivan Molodetskikh
cd5af8c0d9 tests: Add resizing drag icon test
The test can verify that dynamic drag icon resizing and hotspot
adjustment work as intended.
2023-03-14 19:31:49 -07:00
Matthias Clasen
9a2cc79286 gl: Print max texture size in debug output
This is useful information.
2023-03-14 22:13:37 -04:00
Matthias Clasen
cc7d996a5c Merge branch 'add_visited_state' into 'main'
a11y: Add GTK_ACCESSIBLE_STATE_VISITED

See merge request GNOME/gtk!5616
2023-03-15 01:24:18 +00:00
Aleksandr Melman
79e7078949 Update Russian translation 2023-03-14 20:47:29 +00:00
Matthias Clasen
53cfbbbb65 Merge branch 'drop-gslice' into 'main'
Drop gslice

See merge request GNOME/gtk!5634
2023-03-14 19:22:28 +00:00
Matthias Clasen
bc592c92be inspector: Stop using g_slice 2023-03-14 14:56:42 -04:00
Matthias Clasen
6d380cdfb4 css: Stop using g_slice 2023-03-14 14:56:42 -04:00