Commit Graph

80579 Commits

Author SHA1 Message Date
Alice Mikhaylenko
dc1ff3c2e3 csscolorvalue: Fix oklab() percentage range 2024-06-06 00:35:52 +04:00
Alice Mikhaylenko
6602ac5eae testsuite: Fix css tests
There are a bunch of new deprecations, and some tests weren't in
meson.build.
2024-06-06 00:35:52 +04:00
Alice Mikhaylenko
5dab5bf0e9 css: Allow percents in opacity
Add another missing feature from web css. It's nice to be able to use the
same variables in color-mix() and here.
2024-06-06 00:22:19 +04:00
Matthijs Velsink
721be8fe9f gsktransform: Document consuming functions
Since GskTransform is immutable, a lot of the documented "methods" are
more like "functions", in the sense that they don't keep the instance
alive but rather consume it.

This is annotated with `(transfer full)`, but since these functions are
listed as methods, their first argument is not shown.

Instead, let's add a line to the docs of each consuming function that
clarifies this behavior.
2024-06-05 15:59:49 +02:00
Matthias Clasen
58fe590eae Merge branch 'matthiasc/for-main' into 'main'
css: Plug a memory leak

See merge request GNOME/gtk!7341
2024-06-05 12:18:50 +00:00
Matthias Clasen
c18a7ff5cf css: Plug a memory leak
This snuck in when the relative color support was merged.
2024-06-05 07:22:47 -04:00
Matthias Clasen
24fc38b287 Merge branch 'matthiasc/for-main' into 'main'
docs: Improve css color migration docs

See merge request GNOME/gtk!7340
2024-06-04 18:47:21 +00:00
Matthias Clasen
aa03c50f05 theme: Use better replacements for color expressions
These match what we recommend for migration.
2024-06-04 12:54:41 -04:00
Matthias Clasen
03e971b2e3 Revert "theme: Stop using alpha() and shade()"
This reverts commit 0e94e5ecda.
2024-06-04 12:48:55 -04:00
Matthias Clasen
a595133b77 docs: Improve css color migration docs
With relative colors, we can do better.
2024-06-04 12:39:40 -04:00
Matthias Clasen
e50f4ecccf NEWS: Updates 2024-06-04 12:00:02 -04:00
Matthias Clasen
67913e4af0 docs: Add more details about CSS colors 2024-06-04 12:00:02 -04:00
Matthias Clasen
b3d1795327 Merge branch 'file-chooser-shortcut-new-folder' into 'main'
gtkfilechooserwidget: Add shortcut to create a new folder

Closes #5527

See merge request GNOME/gtk!7338
2024-06-04 15:38:38 +00:00
Matthias Clasen
6edcc8f256 Merge branch 'css-relative-colors' into 'main'
css: Support relative colors

See merge request GNOME/gtk!7326
2024-06-04 14:59:00 +00:00
Matthias Clasen
d5e5f47666 css: Add tests for relative colors 2024-06-04 10:47:54 -04:00
Matthias Clasen
0524c40640 css: Support relative colors
Parse the various color(from <color> ...) syntaxes, and implement
them.

Add a new 'relative color' subtype for color values, and a new
'color coord' subtype for number values. Use these for relative
colors where the original color can't be resolved at parse time.
2024-06-04 10:47:54 -04:00
Matthias Clasen
b5fd894f77 css: Add a function to get color coords
This will be used in the implementation of relative colors.
2024-06-04 10:47:21 -04:00
Matthias Clasen
d8492121aa css: Rewrite the color parsing code
Make this more uniform, and easier to extend.

Also, use gtk_css_number_value_parse_with_context, since we
are going to add context here in the future.
2024-06-04 10:47:21 -04:00
Matthias Clasen
4a0bf603d7 css: Add context for parsing numbers
In the future, parsing numbers will depend one some context, so
add a context struct to the involved apis. This is not used yet.
2024-06-04 10:47:21 -04:00
Matthias Clasen
02fa89df9e css: Change the api for resolving colors
We will need to compute other values in here in the future, and for
that we need all the arguments that get passed to compute(), so carry
them along.

Update all callers.
2024-06-04 10:47:21 -04:00
Martin
5b6dde9a73 Update Slovenian translation 2024-06-04 07:27:42 +00:00
Automeris naranja
e9d8ebdfc9 gtkfilechooserwidget: Add shortcut to create a new folder
Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/5527
2024-06-03 22:49:11 -03:00
Matthias Clasen
366efc3d61 Merge branch 'css-color-deprecations2' into 'main'
css: Deprecate our own color functions

See merge request GNOME/gtk!7311
2024-06-04 00:41:44 +00:00
Matthias Clasen
3b890fd3c1 css: Document replacements for color stuff
Document how named colors and non-standard color expressions
can be replaced.
2024-06-03 20:37:52 -04:00
Matthias Clasen
5de373a14b css: Deprecate our own color functions
We will soon have new standards-conformant color functions from
the css-colors-5 spec, so these can be phased out.
2024-06-03 20:37:52 -04:00
Matthias Clasen
24cb9d2437 docs: Fix the 4to5 migration guide
This was referring to a nonexisting api.
2024-06-03 20:37:52 -04:00
Matthias Clasen
83aa176466 docs: Add the 4to5 migration guide to the docs
Adding this to the built docs ensures that it is buildable.
2024-06-03 20:37:52 -04:00
Matthias Clasen
0e94e5ecda theme: Stop using alpha() and shade()
These are being phased out in favor of color-mix().
2024-06-03 20:37:52 -04:00
Matthias Clasen
130485a583 Merge branch 'wip/alice/colors-2' into 'main'
Implement color-mix()

See merge request GNOME/gtk!7336
2024-06-03 21:17:54 +00:00
Alice Mikhaylenko
f34c10abb5 csscolorvalue: Get rid of the literal type
Just use color with srgb color space and serialize_as_rgb=TRUE.
2024-06-03 23:59:44 +04:00
Alice Mikhaylenko
48b00f0ac1 testsuite: Add color-mix() tests 2024-06-03 23:59:44 +04:00
Alice Mikhaylenko
743329a3af csscolorvalue: Implement color-mix() 2024-06-03 23:59:44 +04:00
Alice Mikhaylenko
f5783f1637 csscolor: Add functions for parsing and printing interpolation method 2024-06-03 23:59:44 +04:00
Matthias Clasen
67f61a8d39 Merge branch 'matthiasc/for-main' into 'main'
Fix the build

See merge request GNOME/gtk!7337
2024-06-03 19:16:22 +00:00
Matthias Clasen
f7df663dea Fix the build
I typoed in a2223c0884.
2024-06-03 15:10:19 -04:00
Alice Mikhaylenko
c99278aa58 csscolor: Allow printing hsl and hwb as color() too 2024-06-03 22:09:26 +04:00
Alice Mikhaylenko
1765e1b7c2 testsuite: Add GTK_DEBUG=css
Make named color tests work, since they expect deprecation warnings atm.
2024-06-03 21:53:52 +04:00
Matthias Clasen
bf1a434d5c Merge branch 'font-subsetting-in-node-files' into 'main'
Use font subsetting in serialized nodes

See merge request GNOME/gtk!7227
2024-06-03 12:47:59 +00:00
Matthias Clasen
9256b5b552 rendernode tool: Add an extract command
This lets one extract the data urls from a node file.
2024-06-03 08:28:21 -04:00
Matthias Clasen
577e4afb3c Improve font deserialization
Even if we disable font fallback, after adding Cantarell Regular
to the custom fontmap, fontconfig will helpfully synthesize
Cantarell Bold for us. So, just don't check for the font at all.
If there is a url, add it to the fontmap and leave it up to the
serializing code to ensure that we don't end up with duplicate
fonts.
2024-06-03 07:45:57 -04:00
Matthias Clasen
2a05c04db7 Use the hb face as key when tracking fonts
The hb face is is a wrapper around the font file, which is what
we need to track here, since we want to subset and serialize each
used font file exactly once.
2024-06-03 07:44:16 -04:00
Matthias Clasen
a6ffd6b3b2 nodeparser: Subset fonts
When serializing nodes, collect the glyphs that are used from
each font, subset the font to that set of glyphs, and embed it
into the node file. We are careful to preserve the glyph IDs,
so our text nodes transparently work with the subsettted fonts.
2024-06-03 07:38:51 -04:00
Matthias Clasen
24eba7c4c1 Merge branch 'matthiasc/for-main' into 'main'
Drop redundant GLib version check

See merge request GNOME/gtk!7334
2024-06-03 00:22:16 +00:00
Matthias Clasen
80de844922 Cosmetics 2024-06-02 20:07:33 -04:00
Matthias Clasen
a2223c0884 Drop redundant GLib version check
We require GLib 2.76 now.
2024-06-02 20:07:33 -04:00
Matthias Clasen
5ffa2b757c Merge branch 'less-vulkan' into 'main'
Don't use Vulkan without dmabufs

See merge request GNOME/gtk!7220
2024-06-02 23:58:24 +00:00
Matthias Clasen
b660fa27d3 Merge branch 'fix-missing-listeners' into 'main'
wayland: Add missing listeners

See merge request GNOME/gtk!7331
2024-06-02 20:42:13 +00:00
Matthias Clasen
77f0e5e1ba wayland: Add missing listeners
Now that we are using version 6 of the compositor interface,
we need to have preferred scale and bufer transform callbacks
everywhere.
2024-06-02 12:07:51 -04:00
Matthias Clasen
1080822ffa Merge branch 'matthiasc/css-deprecation-warning' into 'main'
css: Emit deprecation warnings only under debug

See merge request GNOME/gtk!7330
2024-06-02 15:33:32 +00:00
Matthias Clasen
3fef45683c css: Emit deprecation warnings only under debug 2024-06-02 15:33:32 +00:00