Commit Graph

75573 Commits

Author SHA1 Message Date
Benjamin Otte
170d49f067 columnviewcell: Ignore ::activatable and ::selectable for cells
This is a row property, not a cell property.
2023-04-01 20:49:40 +02:00
Benjamin Otte
c74ab7aaec columnviewcellwidget: Untangle from GtkListItemWidget
This is step 1 in switching cells to their own ListItem subclass.
2023-04-01 20:49:40 +02:00
Benjamin Otte
00cb4c66cf testdatatable: Add a --pages option
That way, local scrolling is available and the scrolling isn't random.

Recycling should now involve reordering the recycled widgets instead of
just keeping their order because all of them got recycled.
2023-04-01 20:49:40 +02:00
Benjamin Otte
708e067617 columnviewcellwidget: Ensure for_size is large enough
When clipping, we still need to do proper size requests.
2023-04-01 20:49:40 +02:00
Benjamin Otte
a29cf74e05 columnviewcellwidget: Rewrite width unadjusting
Use GtkCssBoxes for that purpose. No more scary CSS math necessary in
the widget.
2023-04-01 20:49:40 +02:00
Benjamin Otte
c760131f6f filechooser: Set a row-factory
This way, we can toggle per-row selectability and ensure files are not
selectable in select-folder mode.
2023-04-01 20:49:40 +02:00
Benjamin Otte
880aea513f columnview: Add gtk_column_view_add_row_factory()
This allows setting a factory to toggle per-row properties.

Implemented are selectable, focusable and activatable.
These are meant to supercede the per-cell selectable and activatable
properties, which make no sense individually.

The focus property makes it possible to focus rows instead of cells,
which is the default behavior.
2023-04-01 20:49:40 +02:00
Benjamin Otte
d1bc552b5f columnview: Implement inertness
This properly implements the same behavior as
62e9d1e470 and avoids randomly losing
factories.

Oops.
2023-04-01 20:49:40 +02:00
Benjamin Otte
e8f0aa6ef8 columnviewrowwidget: Don't discard items in unroot()
Follows 3411b0306ee3b88038abdc736adf60bd004c7b7a and
3fb10ff2d8.
2023-04-01 20:49:40 +02:00
Benjamin Otte
1a6afebbda columnview: Rename to GtkColumnViewCellWidget
Just like with Row/RowWidget, I want to use Cell/CellWidget.
2023-04-01 20:49:40 +02:00
Benjamin Otte
7cfab4edf2 columnview: Add GtkColumnViewRow
There is no way to set it yet, this is just to prove that it works.

It also changes the focus behavior of rows. They are now always
focusable - unless turned off by the factory once that is possible.
2023-04-01 20:49:40 +02:00
Benjamin Otte
04c049ee54 listitem: Add a backwards compatibility workaround
I want to avoid turning the :focusable property into a tristate at all
costs, but that third state is what we had before the property.
2023-04-01 20:49:40 +02:00
Benjamin Otte
5f1b8a31c2 treeexpander: Add docs note about setting GtkListItem::focusable 2023-04-01 20:49:40 +02:00
Benjamin Otte
87059d53a6 columnviewcell: Cells should not be focusable by default 2023-04-01 20:49:40 +02:00
Benjamin Otte
ce531ce280 listview: Add GtkListItem::focusable property
This makes the question if a listitem can be focused or not an explicit
decision by application developers.

Previously an item could be focused if it was selectable and no child or
grandchild was focusable - so if you put a label and icon into it, the
item was focusable, but if you put a GtkTreeExpander or a GtkButton into
it, the item wasn't. This needs to be decided explicitly now.

Technically this is an API break, because the previous behavior does not
exist anymore.
But I really don't want to make this a tristate (focusable, not
focusable, automatic), because then binding it to other things gets
hard, and because all the other focusable proeprties are booleans, too,
and working with them gets a lot harder.

Related: #3910
2023-04-01 20:49:40 +02:00
Benjamin Otte
eb0541c9d1 columnviewcell: Cells aren't selectable or activatable
Rows are.
2023-04-01 20:49:40 +02:00
Benjamin Otte
3048100617 listitem: Use GDK_DECLARE_INTERNAL_TYPE 2023-04-01 20:49:40 +02:00
Matthias Clasen
60921db76f Merge branch 'matthiasc/for-main' into 'main'
inspector: Update some misc info rows

See merge request GNOME/gtk!5768
2023-04-01 18:36:39 +00:00
Matthias Clasen
f7600a62e4 Merge branch 'wip/otte/fractional-cairo' into 'main'
wayland: Enable fractional scaling with the Cairo renderer

See merge request GNOME/gtk!5767
2023-04-01 18:35:33 +00:00
Georges Basile Stavracas Neto
70e6bcce16 Merge branch 'gbsneto/mildly-mid-vulkan-fixes' into 'main'
Vulkan transform / scale fixes

See merge request GNOME/gtk!5757
2023-04-01 18:23:12 +00:00
Matthias Clasen
a4dc0a74fd inspector: Update some misc info rows 2023-04-01 14:21:41 -04:00
Benjamin Otte
6d4d9af14e wayland: Use fractional scaling with the Cairo renderer
Cairo can do that, so just enable it:

 * Create surfaces with the correct fractionally scaled size.
 * Set the Cairo surface's device scale to that number.
2023-04-01 20:05:06 +02:00
Benjamin Otte
84b235aac1 wayland: Allow creating fractional Cairo surfaces
We don't do that yet, because the buffer scale code can't deal with it,
but we can do it now.
2023-04-01 20:05:05 +02:00
Benjamin Otte
ea82f50d13 build: Bump wayland-protocols requirement
The new fractional-scale support requires v1.31
2023-04-01 20:05:05 +02:00
Benjamin Otte
1a71e82fc5 wayland: Use wp_viewport to set buffer scale
Instead of setting the buffer scale via the buffer-scale command, set it
via the viewport.

This technically allows setting fractional scales, but we're not doing
that.
2023-04-01 20:05:01 +02:00
Georges Basile Stavracas Neto
f3b8bd8a98 gsk/gl/renderjob: Decompose matrix for 3D transforms
While this can be more expensive, it's also correct.
2023-04-01 14:47:29 -03:00
Georges Basile Stavracas Neto
ee1730dd49 gsk/vulkan/renderpass: Update scales from transform node
Retrieve the scale from the transform node, and store it as long
as the transform node is being visited. This applies the proper
scale to text nodes.
2023-04-01 14:47:29 -03:00
Georges Basile Stavracas Neto
e0aaf9bc83 gsk/vulkan/renderpass: Refactor scale
Instead of tracking a single scale, track x and y scales separately.
Factor out gsk_vulkan_render_pass_new() into a private function that
receives both scales, and pass 'scale_factor' for both.
2023-04-01 14:46:56 -03:00
Matthias Clasen
63318dcd66 NEWS: Updates 2023-04-01 12:38:38 -04:00
Benjamin Otte
8dd5d649b8 wayland: Use GdkFractionalScale for surface scale
We still always round it to integers when we read it, but we store it as a fraction.

So we could now use it for fractional scaling.
2023-04-01 18:23:38 +02:00
Benjamin Otte
40ac6f22a3 wayland: Introduce GdkFractionalScale type
We want to use it later for various things, this just adds the
infrastructure we will need.
2023-04-01 18:23:38 +02:00
Matthias Clasen
1262477e17 Merge branch 'always_expose_showing' into 'main'
a11y: Set ATSPI_STATE_SHOWING for all widgets, not only for windows

Closes #5194

See merge request GNOME/gtk!5738
2023-04-01 14:41:42 +00:00
Matthias Clasen
afe3f0ef0c Merge branch 'matthiasc/for-main' into 'main'
inspector: Improve display of paths

See merge request GNOME/gtk!5766
2023-04-01 14:14:31 +00:00
Matthias Clasen
258fb091dc inspector: Improve display of paths
The values in the path section are long and generally
ellipsized. It does not make sense to reserve extra
space that the labels don't need.
2023-04-01 09:52:31 -04:00
Matthias Clasen
7aca807b15 Merge branch 'wayland-details' into 'main'
inspector: Show Wayland protocols

See merge request GNOME/gtk!5765
2023-04-01 13:51:40 +00:00
Matthias Clasen
ffdbb9077c wayland: Some debug spew tweaks 2023-04-01 09:31:12 -04:00
Matthias Clasen
23268e84b3 inspector: Show Wayland protocols
This could be useful for somebody.
2023-04-01 09:31:12 -04:00
Matthias Clasen
16c1acc539 Merge branch 'bilelmoussaoui-main-patch-24659' into 'main'
docs: Improve GtkLabel rendering

See merge request GNOME/gtk!5764
2023-04-01 12:48:19 +00:00
Nathan Follens
3393813949 Update Dutch translation 2023-04-01 12:29:11 +00:00
Bilal Elmoussaoui
e95c50ca4e docs: Improve GtkLabel rendering
By adding some missing links & avoid the browser
from rendering the entities as their equivalent symbols
2023-04-01 12:06:11 +00:00
Benjamin Otte
a3f216be00 Merge branch 'wip/otte/fractional-scale' into 'main'
wayland: Add support for the fractional scale protocol

See merge request GNOME/gtk!5763
2023-04-01 11:39:32 +00:00
Benjamin Otte
54e8bd898a wayland: Add support for the fractional scale protocol
April fools!

No, really.
The fractional scale protocol is just a way to track the surface scale,
but not a way to draw fractional content.
This commit uses it for that, so tht we don't rely on tracking outputs.

This also allows magnifiers etc to send us a larger (integer) scale if
they would like that, that is not represented by the outputs.
2023-04-01 12:57:03 +02:00
Benjamin Otte
2fb11765c7 Merge branch 'wip/otte/wayland-versions' into 'main'
wayland: Use proper get_version() functions

See merge request GNOME/gtk!5761
2023-04-01 00:52:11 +00:00
Benjamin Otte
b4492a97bf wayland: Use wl_seat_get_version() 2023-04-01 02:22:21 +02:00
Benjamin Otte
6f93f52b56 wayland: Use zwp_pointer_gestures_v1_get_version() 2023-04-01 02:22:21 +02:00
Benjamin Otte
68b8c5cd99 wayland: Use gtk_shell1_get_version()
... or correct gtk_surface1_get_version() alternative.
2023-04-01 02:22:21 +02:00
Benjamin Otte
9d99259cbd wayland: Use wl_data_device_manager_get_version() 2023-04-01 02:22:21 +02:00
Benjamin Otte
55b5c847f7 wayland: Use zxdg_output_manager_v1_get_version() 2023-04-01 02:22:21 +02:00
Benjamin Otte
3d3d22e844 wayland: Remove unused variable
Also, Wayland has get_version() functions, so if we ever need it, we can
use that.
2023-04-01 02:22:21 +02:00
Benjamin Otte
ae2c28af89 wayland: Check correct interface
buffer scale is a surface property, so check the version of the surface
interface, not the compositor one.
2023-04-01 02:22:21 +02:00