Commit Graph

78990 Commits

Author SHA1 Message Date
Maximiliano Sandoval
f57300b924
Use GDK_NO_MODIFIER_MASK in default prop values 2024-01-13 01:30:02 +01:00
Matthias Clasen
c146f225ff Merge branch 'big-glyph-test' into 'main'
gsk: Fix big glyphs getting clipped

See merge request GNOME/gtk!6744
2024-01-12 21:31:35 +00:00
Matthias Clasen
9f4f65be4a gsk: Add test for clipped big glyphs
Tests the fix in the previous commit 93715b963e.

Sadly, the flipped variant of this test fails with the cairo
renderer, so it is marked as -nocairo. All the other renderers
pass it.
2024-01-12 16:02:05 -05:00
Matthias Clasen
93715b963e gsk: Fix big glyphs getting clipped
We were inadvertedly shifting the rendering by one pixel.
2024-01-12 15:55:27 -05:00
Benjamin Otte
c1407f2ca6 Merge branch 'wip/otte/for-main' into 'main'
gpu: Remove unnecessary optimization

Closes #6322

See merge request GNOME/gtk!6743
2024-01-12 19:23:46 +00:00
Benjamin Otte
3b299f574d testsuite: Add a test for contained clips
Related: #6322
2024-01-12 20:06:04 +01:00
Benjamin Otte
a51c6aed47 gpu: Introduce "contained" clip
This clip is different from "none" in that the bounds rect cannot be
ignored and that potential drawing outside the clip must be avoided.

In particular it means that clip nodes cannot be discarded if they
encompass the full clip region.

Fixes #6322
2024-01-12 20:06:04 +01:00
Benjamin Otte
b552cf74dd gpu: Remove unnecessary optimization
Every branch in the switch is so optimized that it does this check
early anyway, so there's no need to have it as an extra step.
2024-01-12 20:06:04 +01:00
Matthias Clasen
0be0265751 Merge branch 'ebassi/doc-since-fix' into 'main'
docs: Add missing Since to gtk-show-status-shapes setting

See merge request GNOME/gtk!6741
2024-01-12 15:04:05 +00:00
Matthias Clasen
207dd6fe0d Merge branch 'matthiasc/for-main' into 'main'
gsk: Fix up test names to include 'compare'

See merge request GNOME/gtk!6739
2024-01-12 14:38:46 +00:00
Emmanuele Bassi
a87ff8d556 docs: Add missing Since to gtk-show-status-shapes setting 2024-01-12 12:54:54 +00:00
Matthias Clasen
153cb8316e gsk: Fix up test names to include 'compare' 2024-01-11 23:19:29 -05:00
Matthias Clasen
7ad7c0d8c1 Merge branch 'switch-shapes' into 'main'
switch: Follow "switch-shapes" setting

Closes #5354

See merge request GNOME/gtk!6731
2024-01-11 19:19:58 +00:00
Benjamin Otte
61595af586 Merge branch 'ngl-backbuffer-leak' into 'main'
ngl: Don't leak the backbuffer

See merge request GNOME/gtk!6736
2024-01-11 11:16:31 +00:00
Matthias Clasen
d240c35850 ngl: Don't leak the backbuffer
Clear it in unrealize, just like the vulkan renderer does with
its targets.
2024-01-10 23:08:01 -05:00
Matthias Clasen
d276eb9e9a Merge branch 'test-font-tweaks' into 'main'
tests: Change the way custom fonts are handled

See merge request GNOME/gtk!6734
2024-01-11 03:33:15 +00:00
Matthias Clasen
afe4cbf26d tests: Change the way custom fonts are handled
Instead of setting FONTCONFIG_FILE to a custom font configuration,
pass the directory containing the fonts as TEST_FONTS and use
FcConfigAppFontAddDir to add them to the default font configuration.
2024-01-10 22:18:37 -05:00
Matthias Clasen
76e5ef6937 Merge branch 'node-editor-tweaks' into 'main'
node-editor: Make test fonts available

See merge request GNOME/gtk!6733
2024-01-11 02:55:50 +00:00
Matthias Clasen
0ed43f66a9 docs: Beef up the node-editor man page
Mention the GTK_SOURCE_DIR environment variable in the man page.
2024-01-10 21:10:36 -05:00
Matthias Clasen
4882514234 node-editor: Make test fonts available
Add the directory containing test fonts for gsk tests to the
font configuration, so that node files from the testsuite using
these fonts just work.
2024-01-10 21:10:36 -05:00
Matthias Clasen
a15e87d2a6 Merge branch 'mixed-color-test' into 'main'
gsk: Add another font text

See merge request GNOME/gtk!6732
2024-01-11 01:50:09 +00:00
Matthias Clasen
cc92b9b19f gsk: Add another font text
This is similar to text-mixed-color, but it uses the COLRv1 table,
to test our support for this font technology.
2024-01-10 19:44:55 -05:00
Florian Müllner
bf0120f73d switch: Follow "show-status-shapes" setting
Whether or not switches include shapes to indicate their ON/OFF
state is currently controlled by the stylesheet (in particular
the HighContrast style).

However there are use cases for both using the HighContrast style
without shapes, and for using shapes with the regular stylesheet,
so follow the newly added "show-status-shapes" setting instead.

https://gitlab.gnome.org/GNOME/gtk/-/issues/5354
2024-01-11 01:33:16 +01:00
Matthias Clasen
7f06eed8da Merge branch 'hc-cleanup' into 'main'
wayland/display: Don't notify "icon-theme" on high-contrast changes

See merge request GNOME/gtk!6730
2024-01-10 21:38:55 +00:00
Matthias Clasen
dc30044829 Merge branch 'gpu-fix-mixed-color-text' into 'main'
gpu: Fix handling of mixed-color text runs

See merge request GNOME/gtk!6725
2024-01-10 18:11:23 +00:00
Matthias Clasen
781fe2d7fa gsk: Add a compare test for mixed color runs
This tests the fixes in aa82190da659b5 and dcaa2c4ccb182c74cb40.

The test uses a custom font named 'text-mixed-color' which contains
six glyphs that are just boxes. Glyphs 1, 2, 3 are just plain glyphs,
and glyphs 4, 5, 6 are color glyphs in red, green and blue.

The glyphs are mapped to the characters A, B, C, D, E, F.

The test is currently disabled for cairo, since it has some issues
with transformed color glyphs.
2024-01-10 12:49:08 -05:00
Florian Müllner
b8a61f7899 wayland/display: Don't notify "icon-theme" on high-contrast changes
Since commit c3706ea9ec, the "high-contrast" setting no longer
forces the "HighContrast" icon theme.
2024-01-10 15:46:46 +01:00
Matthias Clasen
a44ca6756a gpu: Use the right format for atlases
The glyph atlas format needs to match the cairo memory format.
NGL was getting this wrong, causing color glyphs to have their
red and blue swapped.
2024-01-10 08:00:15 -05:00
Matthias Clasen
490a9f193d gpu: Fix handling of mixed color text runs
We need to decide per-glyph whether to use coloring or texture ops.
2024-01-10 08:00:15 -05:00
Matthias Clasen
754d364efd gsk: Allow custom fonts in tests
The commit adds a custom fontconfig configuration in
testsuite/gsk/fonts/fonts.conf and sets the FONTCONFIG_FILE
environment variable for the gsk compare tests to point at it.

To use a custom font in tests, just drop it into the
testsuite/gsk/fonts/ directory.

The font configuration includes the system configuration,
so existing tests should not be affected.
2024-01-10 07:58:19 -05:00
Benjamin Otte
4939f0bb75 Merge branch 'wip/otte/for-main' into 'main'
contour: Fix stroke bounds for rect contour

See merge request GNOME/gtk!6728
2024-01-10 01:05:22 +00:00
Carlos Garnacho
7537d80047 Merge branch 'wip/show-tablet-cursor' into 'main'
gdk/wayland: reset cursor_is_default on proximity out

Closes #6312

See merge request GNOME/gtk!6720
2024-01-10 00:55:32 +00:00
Benjamin Otte
c5bdf0a995 testsuite: Add tests for pixel grid accuracy
See previous commit for details.
2024-01-10 01:33:49 +01:00
Peter Hutterer
04870fc1a1 gdk/wayland: Reset cursor_is_default on proximity out
For tablet tools if we have NULL cursor, we use the default cursor
instead. This provides us with a tablet cursor when an application never
sets the cursor.

However, on proximity out when we clear said cursor we also
need to toggle off cursor_is_default, otherwise on the next proximity in
we assume we already have a cursor and never update it again.

This leads to an invisible cursor over GTK application when the tablet
tool is brought into proximity over the widget (but not when moving into
the widget from the outside).

Closes: #6312
2024-01-10 00:25:01 +00:00
Matthias Clasen
43e5bc795a Merge branch 'log_whitespace' into 'main'
Add missing space to warning

See merge request GNOME/gtk!6729
2024-01-10 00:06:05 +00:00
Spencer Burris
f3ec58d290 Add missing space to warning 2024-01-09 16:57:26 -07:00
Benjamin Otte
5b3d14e15b gpu: respect pixel grid for Cairo rendering
Make sure fallbacks and fill/stroke masks use image surfaces with the
same pixel grid as the target if possible.

Fixes blurriness with some path renderings.
2024-01-10 00:13:52 +01:00
Benjamin Otte
131ab11f5c testsuite: Check that pixel grid math respects offsets 2024-01-10 00:13:52 +01:00
Benjamin Otte
a2eb467663 gpu: Change rect_round_pixels() to take an offset
We need to respect the offset when converting to the pixel grid, so pass
the current offset into the function.

Also move the rounded out of gsk_gpu_get_node_as_image() and into the 2
callers, because the offset is not passed into the function and I see no
reason to change that.
2024-01-10 00:13:52 +01:00
Benjamin Otte
06f85ee566 contour: Fix stroke bounds for rect contour
There's no tests for stroke bounds, oh no!
2024-01-09 23:27:55 +01:00
Benjamin Otte
aab40ad6a2 gpu: Fix text coordinates in the ubershader 2024-01-09 23:27:55 +01:00
Matthias Clasen
364eec24b1 Merge branch 'demos-enable-vulkan' into 'main'
Enable vulkan on the flatpak demos.

See merge request GNOME/gtk!6724
2024-01-08 20:53:25 +00:00
Jan Willem Eriks
f1fe21e009
Enable vulkan on the flatpak demos.
Since ed12c0cd5a enabled vulkan by default also build the demos with Vulkan enabled.
2024-01-08 19:01:02 +01:00
Artur S0
126cbccddf Update Russian translation 2024-01-08 13:43:52 +00:00
Benjamin Otte
26cf74de5c Merge branch 'wip/otte/for-main' into 'main'
Wip/otte/for main

See merge request GNOME/gtk!6721
2024-01-08 11:48:43 +00:00
Benjamin Otte
2ecb8c08dc testsuite: Add a test for borders inside opacity
Tests the latest fix.
2024-01-08 11:17:09 +01:00
Matthias Clasen
ce7cc942e4 gpu: Use opacity for border colors
We were computing the right colors, but forgot to use them.
2024-01-08 11:17:09 +01:00
Benjamin Otte
a0e9d93b4c testsuite: Add a test for previous fix
Fill a rectangle with fractional coordinates << 1.0 but scale it up so
that it ends up being nice integers.

Makes sure that nobody does any bad rounding here.
2024-01-08 11:17:09 +01:00
Benjamin Otte
017aea1952 gl: Fix rendering of nodes with fractional offsets
We can't just be floored by fractions, especially not when we have a
massive scale factor.

Fixes rendering of paintable gtk-demo.
2024-01-08 09:28:26 +01:00
Benjamin Otte
63d7b22924 demo: Port the paintable demo to paths 2024-01-08 09:28:26 +01:00