Commit Graph

80432 Commits

Author SHA1 Message Date
Matthias Clasen
48e707aceb css: Color interpolation fixes
Some minor gotchas and oversights.
2024-05-31 21:29:49 -04:00
Matthias Clasen
e2f9ff2304 Fix oklch conversion
The pseudo-code in the spec is broken.
2024-05-31 21:27:22 -04:00
Matthias Clasen
fa3a72c8f6 Fix oklch conversion
We want to normalize angles to be in [0, 360).
2024-05-31 21:25:54 -04:00
Matthias Clasen
fc45d90834 css: Fix oklab parsing 2024-05-31 19:33:56 -04:00
Matthias Clasen
fcd95cd5c6 css: Fix oklab conversion 2024-05-31 19:33:22 -04:00
Matthias Clasen
b8c1ac41d2 Merge branch 'css-color-missing-components' into 'main'
css: Add GtkCssColor

See merge request GNOME/gtk!7323
2024-05-31 21:05:24 +00:00
Matthias Clasen
90e1ce0906 Merge branch 'new-docstrings' into 'main'
Add missing docstrings

See merge request GNOME/gtk!7321
2024-05-31 19:57:53 +00:00
Matthias Clasen
d121fd5b7d css: Tweak compute for color values
Make color values carry their srgb equivalent and don't turn them
into literals at compute time. This is necessary so we can use their
original color space values in interpolation.

This makes color values a bit larger, but they still fit into one
cacheline.

We don't change handling of named colors and our color expressions.
They still get turned into literal colors.
2024-05-31 15:51:02 -04:00
Matthias Clasen
4d88fcc1db css: Use gtk_css_color_convert
Use gtk_css_color_convert for going to srgb and stop relying on
GdkRGBA for printing.
2024-05-31 15:51:02 -04:00
Matthias Clasen
85fcda178e css: Implement color interpolation
Implement gtk_css_color_convert, which is an attempt to implement
most of https://www.w3.org/TR/css-color-4/#interpolation for the
color spaces we support.
2024-05-31 15:51:02 -04:00
Matthias Clasen
ecc678454b css: Implement color conversion
Implement gtk_css_color_convert, which is an attempt to
implement https://www.w3.org/TR/css-color-4/#color-conversion
for the color spaces we support.

Missing:
- white point adaptation
- gamut mapping
2024-05-31 15:51:02 -04:00
Matthias Clasen
5a85bc691e css: Split off GtkCssColor
Break out a GtkCssColor struct.
2024-05-31 15:51:02 -04:00
Matthias Clasen
d506a5eea8 colorutils: Add some more utils
Add oklab<>srgb-linear and rgb<>hls conversions.
2024-05-31 15:51:02 -04:00
Matthias Clasen
aefa79413b css: Implement missing components in colors
Add support for parsing none for color components, and preserve
that information for serialization. We currently don't use it
for other things, but we should.
2024-05-31 15:51:02 -04:00
Matthias Clasen
73e4eb7552 css: gtk_css_color_value_new_literal static too
This function is only used inside gtkcsscolorvalue.c as well.
2024-05-31 15:50:43 -04:00
Matthias Clasen
dff340530a Merge branch 'matthiasc/for-main' into 'main'
css: Make some color value functions static

See merge request GNOME/gtk!7319
2024-05-31 16:40:33 +00:00
Matthias Clasen
f6ea3e1684 inspector: Make css deprecations opt-in
Add a button to show deprecation warnings (since those will
unfortunately be common for while, due to backwards compat).
2024-05-31 11:25:11 -04:00
Matthias Clasen
f790441505 colorutils: Add some more utils
Add oklab<>srgb-linear and hsl<>rgb conversions.
2024-05-31 10:13:35 -04:00
Matthias Clasen
0c307f7563 css: Make some color value functions static
These aren't used outside of gtkcsscolorvalue.c, so don't export
them.
2024-05-31 10:13:35 -04:00
Matthias Clasen
f89dc9644c Cosmetics 2024-05-31 10:12:28 -04:00
Matthias Clasen
735455b523 Merge branch 'memoryfix' into 'main'
Changes to fix the memorytexture regression

Closes #6260

See merge request GNOME/gtk!7111
2024-05-31 10:35:39 +00:00
Maximiliano Sandoval
d037cfaf44
Add docstrings for deprecated classes 2024-05-31 11:48:24 +02:00
Maximiliano Sandoval
293d63425a
gtkiconview: Add missing docstrings 2024-05-31 11:48:24 +02:00
Maximiliano Sandoval
38f9bb87bc
gtkentrycompletion: Document missing properties 2024-05-31 11:48:24 +02:00
Maximiliano Sandoval
64abadb370
gtkcolorchooserdialog: Document show-editor 2024-05-31 11:48:23 +02:00
Maximiliano Sandoval
6f85827fcb
gtkfilechooserwidget: Document missing props 2024-05-31 11:48:23 +02:00
Maximiliano Sandoval
b0e321cfb8
gtkstylecontext: Document display property 2024-05-31 11:48:23 +02:00
Maximiliano Sandoval
46d0569365
gtktypes: Document GtkCssStyleChange
This is used in the css_changed virtual function of GtkWidget.
2024-05-31 11:48:19 +02:00
Maximiliano Sandoval
2eea911a0f
gdktoplevel: Document TitlebarGesture 2024-05-31 11:47:30 +02:00
Maximiliano Sandoval
ee4a817121
gdk: docs: Document error quarks 2024-05-31 11:47:30 +02:00
Maximiliano Sandoval
3d1f914271
gskglrenderer: Document GL renderers 2024-05-31 11:47:30 +02:00
Maximiliano Sandoval
7bb0639a75
gskrendernode: Document serialization error quark 2024-05-31 11:47:29 +02:00
Maximiliano Sandoval
f8f38aab63
gskpathpoint: Document copy and free 2024-05-31 11:47:29 +02:00
Maximiliano Sandoval
75c2bd53aa
gtkcsslocation: Document struct 2024-05-31 11:47:29 +02:00
Maximiliano Sandoval
83921750ae
gtknotebook: Document signals 2024-05-31 11:47:29 +02:00
Maximiliano Sandoval
413512eba7
gtkheaderbar: Document title-widget property 2024-05-31 11:47:29 +02:00
Maximiliano Sandoval
e824764dc3
gtktexttag: Document properties 2024-05-31 11:47:28 +02:00
Maximiliano Sandoval
61b12abdab
gtkshortcutssection: Document change-current-page 2024-05-31 11:47:28 +02:00
Maximiliano Sandoval
07bd5c7b05
gtkscale: Document FormatValueFunc 2024-05-31 11:47:28 +02:00
Maximiliano Sandoval
1dc20eda28
gtk: Document constants 2024-05-31 11:47:28 +02:00
Maximiliano Sandoval
5a9299f626
gtklistbox: Document signals
The docs of move-cursor is taken from FlowBox's.
2024-05-31 11:47:28 +02:00
Maximiliano Sandoval
9c86c67f06
gtkpadcontroller: Document properties 2024-05-31 11:47:27 +02:00
Maximiliano Sandoval
e6ca7668be
gtkdebug: Document DEBUG_CHECK 2024-05-31 11:47:27 +02:00
Maximiliano Sandoval
0b540b9ad1
gtkactionable: Document properties 2024-05-31 11:47:25 +02:00
Maximiliano Sandoval
514cdf7398
gtk: Document PrintSettingsFunc 2024-05-31 10:22:44 +02:00
Maximiliano Sandoval
2ab52d73ab
gtkprintsettings: Document constants
The docstring is taken form existing constants and their getters
docstring.
2024-05-31 10:22:38 +02:00
Maximiliano Sandoval
b3ae172c1e
gtk: Document error quark functions 2024-05-31 10:22:23 +02:00
Maximiliano Sandoval
a6d1df66ec
messagedialog: Document buttons property 2024-05-31 10:22:05 +02:00
gayathri.berli@ibm.com
ba92ce342e Merge branch 'main' into memoryfix 2024-05-30 18:21:06 +05:30
Matthias Clasen
9f4c715516 Merge branch 'css-color-minor' into 'main'
css: Simplify color values

See merge request GNOME/gtk!7316
2024-05-30 03:57:31 +00:00