Commit Graph

80753 Commits

Author SHA1 Message Date
Arjan Molenaar
4fef3c157a macos: keybindings for GtkCalendar
Use Cmd, instead of Ctrl on macOS.
2024-06-28 10:29:58 +02:00
Arjan Molenaar
38602823bb macos: keybings for shortcut window
Allow search with Cmd-F.
2024-06-28 10:29:58 +02:00
Arjan Molenaar
6e02b9d5bc macos: keybindings for deprecated widgets
mac-style select-all and unselect-all.
2024-06-28 10:29:58 +02:00
Arjan Molenaar
03337534f9 macos: add keybindings for search next/previous 2024-06-28 10:29:57 +02:00
Arjan Molenaar
613a004d18 macos: shortcuts for GtkListBase and GtkListBox
Select all and multi-select and toggle selection.
2024-06-28 10:29:57 +02:00
Arjan Molenaar
6fa23794fc macos: key bindings for GtkTextView 2024-06-28 10:29:57 +02:00
Arjan Molenaar
82027bb51e macos: Add macos key binding to GtkLabel 2024-06-28 10:29:57 +02:00
Arjan Molenaar
9e5ce813c4 events/macos: Support Cmd modifier for text editing
This makes key events feel more natural on macOS.
2024-06-28 10:29:57 +02:00
Arjan Molenaar
b7f3beda00 macos: Map Cmd directly to Meta
Why need a mapping via a MOD2 mask?
2024-06-28 10:29:57 +02:00
Matthias Clasen
f4509a63b0 Merge branch 'css-current-color1' into 'main'
css: Handle currentcolor more correctly

See merge request GNOME/gtk!7387
2024-06-28 01:22:03 +00:00
Matthias Clasen
29559deeeb reftests: Avoid some deprecated css
alpha() is deprecated, replace it with a relative color.
2024-06-27 21:03:14 -04:00
Matthias Clasen
0cff62335b Fix style variables test
Make the results match what the comments actually say.
2024-06-27 21:03:14 -04:00
Matthias Clasen
e4325e5b2b css: Add more currentcolor style tests
These tests check various situations with inheritance and
currentColor. In particular the caret-color test was not
working correctly before we handled used values explicitly.
2024-06-27 21:03:14 -04:00
Matthias Clasen
f57010180c css: Update style printing to show used values
This is what we want to see, most of the time.
2024-06-27 21:03:14 -04:00
Matthias Clasen
5807b68d5b gtk: Update all users to use used values
Update all widgets and rendering code to use the used values of
relevant css properties.
2024-06-27 21:03:14 -04:00
Matthias Clasen
1af746e136 css: Update animated styles to resolve used values
The way this works is that we first apply the value changes
from animations, which will trigger recomputation of the regular
style properies if the keyframes contains custom properties.

After that is done, we resolve the used values, base on the
new computed values. This is where currentcolor is resolved.
2024-06-27 21:03:14 -04:00
Matthias Clasen
d3c78c8811 css: Implement used values for static styles
Change the style computation machinery to populate the used
values struct, and stop relying on NULL values in the values
structs to indicate currentColor occurrences. Instead, use
gtk_css_color_value_contains_current_color() when determining
style changes.
2024-06-27 21:03:14 -04:00
Matthias Clasen
28a4f7a60a css: Add an assertion
Passing NULL as compute context does not work, so make it obvious
when it happens.
2024-06-27 21:02:37 -04:00
Matthias Clasen
d54a9d241d css: Add some new style apis
Add separate apis for getting computed and used values, and
a method to resolve used values of a style.
2024-06-27 21:00:18 -04:00
Matthias Clasen
8814c00573 css: Introduce a struct for used values
The GtkCssUsedValues struct will hold the used values of those
css properties where that makes a difference. The new structs
are not used yet.
2024-06-27 20:21:43 -04:00
Matthias Clasen
36b55a8b57 css: Make image values resolve used values
Separate out computed and used values for this type.
2024-06-27 20:21:43 -04:00
Matthias Clasen
e027843cb0 css: Add a way to resolve css images
This will be needed to separate out computed and used values
for css image values.
2024-06-27 20:21:43 -04:00
Matthias Clasen
5de0ebab26 css: Make shadow values resolve used values
Separate out computed and used values for this type.
2024-06-27 20:21:43 -04:00
Matthias Clasen
cc463d52f6 css: Make palette value resolve used values
Separate out computed and used values for this type.
2024-06-27 20:21:43 -04:00
Matthias Clasen
eeca361418 css: Make currentcolor compute to itself
This temporarily breaks currentcolor values. All uses of color
values will have to be fixed up to handle currentcolor at use time.
2024-06-27 19:51:56 -04:00
Matthias Clasen
bdf56ec6d6 css: Make color resolving more robust
Make gtk_css_color_value_resolve() handle situations where it can't
fully resolve a color expression. This will start to happen in the
next commits, when we make currentColor compute to itself

This commit also changes the api for gtk_css_color_value_resolve
to not take the property_id, since we already pass the currentcolor
value that it is meant to help determine. Update all callers.
2024-06-27 19:51:56 -04:00
Matthias Clasen
ee9e302b24 css: Introduce gtk_css_value_contains_current_color
Track whether a value contains currentcolor (in which case
it needs to be resolved at use time).

This just adds the bit and the getter, it isn't used yet.
2024-06-27 19:51:54 -04:00
Matthias Clasen
17b50f08b3 Merge branch 'document_shortcuts_and_actions' into 'main'
docs: Document shortcuts and actions

See merge request GNOME/gtk!7379
2024-06-27 16:20:17 +00:00
g.willems
d58297fa15 docs: Document shortcuts and actions 2024-06-27 16:33:31 +02:00
Matthias Clasen
c27516a1db NEWS: Updates 2024-06-26 21:20:17 -04:00
Matthias Clasen
cf4cd4abd8 Merge branch 'popover-positioning-improvements' into 'main'
popover: Recompute shape more often

See merge request GNOME/gtk!7385
2024-06-27 00:33:45 +00:00
Matthias Clasen
a4cc95b293 popover: Hide if we don't get enough size
If the compositor does not give us our min size, we have to
disappear, or we risk criticals from underallocating widgets.
2024-06-26 17:31:38 -04:00
Matthias Clasen
a8bb6d5918 Merge branch 'matthiasc/for-main' into 'main'
css: Fix animations

Closes #6807

See merge request GNOME/gtk!7382
2024-06-26 20:11:56 +00:00
Matthias Clasen
496c75617c css: Make recomputing animated styles make more sense
When we look for what values need recomputing, we also determine what
value we are going to use to recompute. For values that contain
variables, that is the 'original' value, as returned by
gtk_css_style_get_original_value. For values that we recompute
because they may contain currentcolor, that is the specified value
as returned by gtk_css_animated_style_get_intrinsic_value.

The one issue here is that we currently don't preserve currentcolor
in the computed value, so recomputing the value does not do us
any good in the color case. That will be fixed separately.
2024-06-26 15:51:07 -04:00
Matthias Clasen
6b14f221c1 css: Up our contains-color classification
The color property does not need recomputing here since we are
in the case where we know that the keyframes contain a color value.
And it is background-color, not background-image, that contains
the color for the background shorthand.
2024-06-26 14:23:00 -04:00
Matthias Clasen
9948e0a564 css: Fix animations
Determine whether the style needs recomputation, then recompute
the style, and then set the values from keyframes, so we don't
end up overwriting keyframe changes by recomputing properties from
their original values.

Fixes: #6807
2024-06-26 13:43:14 -04:00
Emmanuele Bassi
c89e029223 Merge branch 'wip/fl/fullscreen-selected-monitor-macos' into 'main'
gdk: Implement fullscreen on selected monitor on macos

See merge request GNOME/gtk!7384
2024-06-26 14:19:15 +00:00
Fabio Lagalla
0ca569baab gdk: Implement fullscreen on selected monitor on macos
The feature was apparently missing, as monitors were always fullscreened at the surface best monitor.

Keep using best monitor if the selected monitor is not specified, otherwise move the window to the selected monitor before going fullscreen.
2024-06-26 15:53:49 +02:00
Matthias Clasen
40b13bfa35 popover: Recompute shape more often
We want to recompute the shape when the attachment position has
changed, since that might require the arrow to be repositioned.
2024-06-26 07:33:15 -04:00
Matthias Clasen
1df3c87ed5 Cosmetics 2024-06-26 07:33:15 -04:00
Matthias Clasen
0b57bd5a53 Merge branch 'no-c-format' into 'main'
gtkfilechooserwidget: Mark string as no-c-format

See merge request GNOME/gtk!7376
2024-06-22 21:33:37 +00:00
Anders Jonsson
5df9b1cb5b gtkfilechooserwidget: Mark string as no-c-format
gettext 0.22 recognizes %b as a C string format which
not is true for date strings, so explicitly mark as
no-c-format.
2024-06-22 20:06:47 +02:00
Matthias Clasen
f5b7e131d6 Merge branch 'ngl-render-texture-dmabuf' into 'main'
ngl: Export dmabuf textures from render_texture

See merge request GNOME/gtk!7375
2024-06-22 17:19:24 +00:00
Matthias Clasen
51012c1802 ngl: Export dmabuf textures from render_texture
We want dmabufs because we can import them into Vulkan, amongst
other things.
2024-06-22 08:02:31 -04:00
Matthias Clasen
b5c1e77d4c Merge branch 'matthiasc/for-main' into 'main'
testsuite: Fix up memorytexture printing

See merge request GNOME/gtk!7374
2024-06-21 23:42:45 +00:00
Matthias Clasen
85149445e0 testsuite: Fix up memorytexture printing
This was bungled in 96cb38dd05.
2024-06-21 19:14:31 -04:00
Matthias Clasen
61d0043f9c Merge branch 'fontconfig-grrr' into 'main'
Try to avoid aliasing with system fonts

See merge request GNOME/gtk!7368
2024-06-21 23:02:00 +00:00
Matthias Clasen
5c97089e59 Update expected results
Since we've given up on embedding subsetted system fonts, we need
to regenerate our reference files once more.
2024-06-21 18:45:43 -04:00
Matthias Clasen
6f5c610858 gsk: Give up automatic font subsetting
Despite my best effort, it seems impossible to make ci and local
builds agree on what font subsetter and fonts to use, so make this
opt-in for now: If you want to produce a node file with embedded
fonts, set GSK_SUBSET_FONTS=1.
2024-06-21 18:45:32 -04:00
Matthias Clasen
a05dd4d194 Isolate our nodeparser tests better
Add a custom fontconfig setup and ship Cantarell as part of it.
This should hopefully make it so that the tests always see the
same default font, as long as you have FONTCONFIG_FILE set up
correctly.

Update all affected tests.
2024-06-21 18:17:11 -04:00