Commit Graph

80739 Commits

Author SHA1 Message Date
Matthias Clasen
0045ac839b Give memory formats a name
This is useful in debugging.

The names I chose are shortened a bit from the enum values. We
use just a single depth, * for premultiplied, and f for float.
2024-06-09 15:59:27 -04:00
Matthias Clasen
a9da807de3 Merge branch 'cmurtag/fix_harfbuzz_subset_wrap' into 'main'
Fix Harfbuzz subset dependency not found in wrap

See merge request GNOME/gtk!7349
2024-06-08 10:26:12 +00:00
cameron
366639b7e4 Fix Harfbuzz subset dependency not found in wrap
Add harfbuzz subset to the harfbuzz wrap file so Meson can find the
dependency.
2024-06-08 13:54:21 +10:00
Emmanuele Bassi
7d2e2171be docs: Fix link to DragIcon.get_for_drag()
It has been marked as a constructor in commit 13013053f7.
2024-06-07 13:33:32 +02:00
Matthias Clasen
e3ceda15ac Merge branch 'gsktransform-improve-docs' into 'main'
gsktransform: Document consuming functions

See merge request GNOME/gtk!7342
2024-06-06 10:53:17 +00:00
Matthias Clasen
7291a21a85 Merge branch 'wip/alice/css' into 'main'
CSS fixes and more tests

See merge request GNOME/gtk!7345
2024-06-05 20:54:12 +00:00
Matthias Clasen
888afe3e46 Merge branch 'wip/alice/opacity' into 'main'
css: Allow percents in opacity

See merge request GNOME/gtk!7346
2024-06-05 20:53:55 +00:00
Alice Mikhaylenko
171bfde133 csscolorvalue: Fix percentage ranges for relative colors
Add tests as well, now that they can be computed at parse time.
2024-06-06 00:35:52 +04:00
Alice Mikhaylenko
82d1fdb714 csscolorvalue: Resolve relative colors at parse time when possible 2024-06-06 00:35:52 +04:00
Alice Mikhaylenko
82b19daa7e csscolorvalue: Don't serialize relative colors as rgb()
Spec says it should be color(srgb).
2024-06-06 00:35:52 +04:00
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