Commit Graph

81547 Commits

Author SHA1 Message Date
Matthias Clasen
491275b444 Merge branch 'radiobutton-focus' into 'main'
checkbutton: Add a 'grouped' style class

Closes #6936

See merge request GNOME/gtk!7622
2024-08-17 12:44:35 +00:00
Matthias Clasen
1cd107d5ab monitor: Don't forbid scales < 1
With fractional scaling, people try out things like 0.75 scaling,
and there's no reason for us to prohibit that from working.

Fixes: #6928
2024-08-17 08:26:55 -04:00
Matthias Clasen
5af2d95bff checkbutton: Add a 'grouped' style class
This will make it easier for themes to style radio buttons
differently from check buttons, since out CSS does not have
:has().

The concrete desire here is to use a different outline for
the focus rectangle.

Update affected tests.

Fixes: #6936
2024-08-17 08:22:54 -04:00
Benjamin Otte
62f5db06a1 Merge branch 'fix-opaque-surface-crash' into 'main'
Avoid a crash in gdk_surface_is_opaque

Closes #6938

See merge request GNOME/gtk!7621
2024-08-17 11:26:27 +00:00
Matthias Clasen
e32a12f877 Avoid a crash in gdk_surface_is_opaque
Nothing in gtk calls gdk_surface_set_opaque_region anymore, so
the opaque region will normally be NULL.

Fixes: #6938
2024-08-17 07:03:57 -04:00
Ekaterine Papava
584733f034 Update Georgian translation 2024-08-17 03:49:13 +00:00
Matthias Clasen
c3c1819e12 Merge branch 'css-variables-fixes2' into 'main'
css: Set the parent of the variable set earlier

Closes #6881

See merge request GNOME/gtk!7618
2024-08-16 16:52:34 +00:00
Matthias Clasen
3f36ebc6e7 Merge branch 'matthiasc/for-main' into 'main'
textview: Fix a regression in selection drawing

Closes #6931

See merge request GNOME/gtk!7620
2024-08-16 16:06:14 +00:00
Matthias Clasen
4aea2d2e09 css: Don't pass style variables redundantly
The context->variables field is expected by the resolve code to be
the keyframe variables. That code takes the style variables from
context->style anyway, so no need to pass them as context->variables
too. And crucially, the lookup code treats the keyframes variables
differently to the style variables, since it doesn't expect the
hierarchical structure that comes from parent styles. This change
fixes infinite recursion in variable lookup with css like

:root {
  --a: var(--b);
}

.foo {
  --b: var(--a);
  color: var(--a);
}

Test included.

Fixes: #6881
2024-08-16 11:38:56 -04:00
Matthias Clasen
4e9107d4b1 widget: Fail properly in compute_transform
We don't currently support computing transforms across native
boundaries. This could be added by using gdk_popup_get_position_x/y.
For now, just fail in this case.

Related: #6355
2024-08-16 10:07:53 -04:00
Matthias Clasen
7d895720be textview: Fix a regression in selection drawing
We were no longer respecting the text color or the selection being
clear.

Fixes: #6931
2024-08-16 08:44:35 -04:00
Benjamin Otte
323dde2b10 Merge branch 'wip/otte/for-main' into 'main'
wayland: Implement GdkToplevel::decorated

See merge request GNOME/gtk!7617
2024-08-16 00:01:54 +00:00
Benjamin Otte
ac16e375c7 wayland: Implement GdkToplevel::decorated
... and use that instead of custom announce_csd/announce_ssd APIs.
2024-08-16 01:38:55 +02:00
Matthias Clasen
31143f9611 Merge branch 'kjellahl/docs-window' into 'main'
docs: Improve gtk_window_set_interactive_debugging() docs

See merge request GNOME/gtk!7614
2024-08-15 16:57:00 +00:00
Matthias Clasen
7da4844dcc Merge branch 'css-variables-crash' into 'main'
css: Fix a crash in variables

Closes #6935

See merge request GNOME/gtk!7615
2024-08-15 15:15:48 +00:00
Matthias Clasen
c9e4abcd3a css: Fix a crash in variables
We were not careful enough when checking for reference cycles.

Fixes: #6935

Test included.
2024-08-15 10:16:47 -04:00
Matthias Clasen
6e80fde45f Merge branch 'accessibility-docs-fix' into 'main'
docs: Fix a typo in a code example on the accessibility page

See merge request GNOME/gtk!7616
2024-08-15 13:49:29 +00:00
Philip Withnall
d182b133a9
docs: Fix a typo in a code example on the accessibility page
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-15 14:18:31 +01:00
Matthias Clasen
5e3240a32f Merge branch 'matthiasc/for-main' into 'main'
colorstate: Don't leak names

See merge request GNOME/gtk!7611
2024-08-14 18:06:36 +00:00
Matthias Clasen
436989d745 gsk: Apply the same transfer fixes
These are copied from gdkcolordefs.h.
2024-08-14 13:21:28 -04:00
Matthias Clasen
f62606105e Fix up transfer function symmetry
The easiest things trigger the silliest mistakes. Add tests
for various properties we want our transfer functions to have,
such as:
- be inverse of each other
- stay within the defined ranges
- by symmetric around 0
2024-08-14 11:45:25 -04:00
Matthias Clasen
0f85a40a25 colorstate: Plug a leak and allocate less
We don't need to allocate the matrices, but we do neet to free
the name of cicp color states.
2024-08-14 11:00:10 -04:00
Matthias Clasen
16ad1e428f colorstate: Don't leak names
The cicp colorstates allocate their names, so they should free
them too.
2024-08-14 11:00:10 -04:00
Matthias Clasen
a6e0028899 Merge branch 'wip/otte/for-kwin' into 'main'
Fix various issues with Kwin git

See merge request GNOME/gtk!7612
2024-08-14 14:58:08 +00:00
Kjell Ahlstedt
dc3def1afd docs: Improve gtk_window_set_interactive_debugging() docs
This function is recommended only if you override the default
key shortcuts for the Inspector.
2024-08-14 16:57:55 +02:00
Kjell Ahlstedt
a14e426fb5 docs: Improve gtk_window_set_interactive_debugging() docs
This function is recommended only if you override the default
key shortcuts for the inspector.
2024-08-14 15:51:56 +02:00
Bruce Cowan
a1a4026867 Update British English translation 2024-08-14 10:27:24 +00:00
Benjamin Otte
aff1b88c92 wayland: Work where the primaries have no name
Set primaries without name if supported, when named primaries are not.
But prefer named primaries if available.

This is just an attempt at defensive coding.
2024-08-14 08:30:55 +02:00
Benjamin Otte
dc072f881c wayland: Accept primaries/primaries_named interchangably
If we get sent primaries with the values as named primaries, treat them
like named primaries.

Fixes colorstate support on Kwin, which never sends named primaries.
2024-08-14 08:30:55 +02:00
Benjamin Otte
824ccfc562 gpu: Add an assertion
If the wrong color states get passed, we need to figure that out, before
we run shaders with junk values doing god knows what.
2024-08-14 08:30:55 +02:00
Benjamin Otte
8c6e5ca131 subsurface: Fully covered backgrounds don't need to be drawn
If the texture covers all of the black background (like when watching a
1080p stream fullscreen on a 1080p monitor) we don't need a compositor
with single pixel support.

Fixes offloading in Kwin.
2024-08-14 08:30:55 +02:00
Benjamin Otte
a7b69ad9b5 subsurface: Don't create a bg_subsurface until we need it
There's a ton of error checking happening that we want to do.

Because it turns out it is not really useful to create a subsurface for
the single pixel buffer when we don't even support single pixel buffers.
2024-08-14 08:30:55 +02:00
Benjamin Otte
3cd25516ab gdk: Improve GDK_DEBUG=linear
Keep a linear and a non-linear rendering colorstate around. That way, we
don't "return self;" from cicp colorstates and then end up with a cicp
ccs.
2024-08-14 08:30:40 +02:00
Benjamin Otte
f3c8c5a9c0 Merge branch 'wip/otte/for-main' into 'main'
color: Handle negative values in all transfer functions

See merge request GNOME/gtk!7609
2024-08-13 23:52:32 +00:00
Matthias Clasen
6878200ccf Merge branch 'matthiasc/for-main' into 'main'
drawcontext: Fix up color state ownership

See merge request GNOME/gtk!7608
2024-08-13 21:42:46 +00:00
Matthias Clasen
e1fbd52c29 gdk: Handle negative values in all transfer function
Make sure that for all eotfs/oetfs, eotf(x) == -eotf(-x)

In particular, don't pass negative values to pow() and cause
undefined behavior.
2024-08-13 15:47:17 -04:00
Benjamin Otte
79c2df8392 color: Handle negative values in all transfer functions
Make sure that for all eotfs/oetfs, eotf(x) == -eotf(-x)

In particular, don't pass negative values to pow() and cause undefined
behavior.
2024-08-13 20:47:40 +02:00
Scrambled 777
0888402cea Update Hindi translation 2024-08-13 18:38:21 +00:00
Matthias Clasen
3dae3205e7 drawcontext: Fix up color state ownership
begin_frame_full does not return a reference, we assume that the
color state is staying alive for the duration of the frame anyway,
so end_frame simply sets priv->color_state to NULL.
2024-08-13 13:23:20 -04:00
Matthias Clasen
4858122d17 Merge branch 'matthiasc/for-main' into 'main'
icon helper: Fix an argument order mishap

See merge request GNOME/gtk!7606
2024-08-13 16:50:31 +00:00
Matthias Clasen
a19023277f icon helper: Fix an argument order mishap
It seems that for a long time, no compiler saw it fit to warn
about this, even though they argument types are not the same.
2024-08-13 10:36:12 -04:00
Emmanuele Bassi
72dc9e3bf1 Merge branch 'fix_popover_docs_typo' into 'main'
docs: Fix popover docs typo

See merge request GNOME/gtk!7605
2024-08-13 12:29:37 +00:00
Mikael Forsberg
5f814cc30a docs: Fix popover docs typo 2024-08-13 13:50:47 +02:00
Martin
23aafbf09f Update Slovenian translation 2024-08-13 05:55:59 +00:00
Matthias Clasen
761dc7cad0 Merge branch 'matthiasc/for-main' into 'main'
testsuite: build fix

See merge request GNOME/gtk!7603
2024-08-13 03:31:47 +00:00
Matthias Clasen
f62a873eef inspector: Show color state of surfaces
Put this information in the misc tab for surfaces.
2024-08-12 22:25:08 -04:00
Benjamin Otte
03c99ebc99 Merge branch 'wip/otte/for-matthiasc' into 'main'
vulkan: Round damage rectangles properly

See merge request GNOME/gtk!7602
2024-08-13 00:24:47 +00:00
Matthias Clasen
cb339f85b8 testsuite: build fix
The statically linked tests need to have -DGTK_COMPILATION=1
in their cflags.
2024-08-12 19:19:15 -04:00
Benjamin Otte
5d056eabf6 egl: Round damage rectangles properly
We need to round outwards and a 1x1 rectangle with offset 0.5,0.5 should
end up as a 3x3 rectangle with offset 0,0 when rounded, not as a 2x2
rectangle.
2024-08-13 00:36:11 +02:00
Benjamin Otte
4e77667ab8 vulkan: Round damage rectangles properly
We need to round outwards and a 1x1 rectangle with offset 0.5,0.5 should
end up as a 3x3 rectangle with offset 0,0 when rounded, not as a 2x2
rectangle.
2024-08-13 00:36:11 +02:00