Matthias Clasen
e04cdce680
css: Implement light-dark()
...
This function returns one of two colors, depending on the
colorscheme that is in use.
2024-06-05 07:24:02 -04:00
Matthias Clasen
812b30eb54
Recompute styles when color-scheme changes
...
Treat a color-scheme change like reloading the theme.
2024-06-05 07:23:34 -04:00
Matthias Clasen
2b5ec9e879
Add a color-scheme setting
...
This is the desktop-wide prefer-dark/prefer-light setting.
2024-06-05 07:23:34 -04: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
Matthias Clasen
cfcc5c5c0b
Merge branch 'docs-add-missing-returns-args' into 'main'
...
docs: Add missing returns and parameter annotations
See merge request GNOME/gtk!7325
2024-06-02 15:26:50 +00:00
Matthias Clasen
856f1808de
Merge branch 'matthiasc/for-main' into 'main'
...
Fix a bug in color conversion
See merge request GNOME/gtk!7328
2024-06-02 15:24:09 +00:00
Matthias Clasen
4341344545
css: Add a utility for color space coords
2024-06-02 11:08:35 -04:00
Matthias Clasen
20392e8840
Cosmetics
2024-06-02 10:48:21 -04:00
Matthias Clasen
426fefff81
Merge branch 'bilelmoussaoui/gi-constructor' into 'main'
...
gtk: Mark DragIcon.get_for_drag as constructor
See merge request GNOME/gtk!7329
2024-06-02 14:43:29 +00:00
Bilal Elmoussaoui
13013053f7
gtk: Mark DragIcon.get_for_drag as constructor
...
Fixes downstream issue: https://github.com/gtk-rs/gtk4-rs/issues/1748
2024-06-02 16:54:17 +03:00
Matthias Clasen
62b9a4af75
Drop an unused static
2024-06-02 09:19:22 -04:00
Matthias Clasen
76caf2c812
color value: Organize the code
...
Add some sections, so I can find my way around.
2024-06-02 08:46:56 -04:00
Matthias Clasen
3d5fce1b9f
Fix a bug in color conversion
...
The linear space corresponding to oklab is oklab, not srgb-linear.
2024-06-02 08:46:33 -04:00
Matthias Clasen
bfe8adbee4
Merge branch 'fix-obvious-doc-issues' into 'main'
...
Fix obvious docstring issues
See merge request GNOME/gtk!7320
2024-06-02 12:02:06 +00:00
Matthias Clasen
827642303c
Merge branch 'fix-getter-for-dropdown' into 'main'
...
gtkdropdown: Use proper attribute
See merge request GNOME/gtk!7327
2024-06-02 11:56:53 +00:00
Maximiliano Sandoval
6b6a0e1257
docs: Fix {g,s}et_property attributes annotations
...
Do not use set_property on getters and vice versa.
2024-06-02 13:49:45 +02:00
Martin
7a98176a02
Update Slovenian translation
2024-06-01 08:53:47 +00:00
Maximiliano Sandoval
a93a986ef2
gtkiconview: docs: Add missing return annotation
2024-06-01 10:01:20 +02:00
Maximiliano Sandoval
39dbc5ea87
gtkcombobox: Document popdown signal return value
2024-06-01 10:01:20 +02:00
Maximiliano Sandoval
cf4d13bee3
gdkevents: gdk_event_get_position return value
2024-06-01 10:01:20 +02:00
Maximiliano Sandoval
0bacde8e0a
gskpathbuilder: Document add_cairo_path path arg
2024-06-01 10:01:19 +02:00
Maximiliano Sandoval
949cd45bb7
gskstroke: Add missing return annotations
2024-06-01 10:01:19 +02:00
Maximiliano Sandoval
2e9e216641
gtkicontheme: Document lockup_icon arguments
2024-06-01 10:01:19 +02:00
Maximiliano Sandoval
1ab8ffaceb
gtktextchild: Document new_with_replacement arg
2024-06-01 10:01:19 +02:00
Maximiliano Sandoval
3cc1726856
gtkstringlist: Document strings property
2024-06-01 10:01:19 +02:00
Maximiliano Sandoval
30eaa2c3cc
gtk: Add missing return annotations
2024-06-01 10:01:19 +02:00
Maximiliano Sandoval
ba5993195a
filedialog: Document get_accept_label
2024-06-01 10:01:19 +02:00
Maximiliano Sandoval
bf42351ebf
cellrendererspinner: Fix active signal docs
2024-06-01 09:04:01 +02:00
Maximiliano Sandoval
ee277f4d92
gtksectionmodel: Fix typo in sections-changed link
2024-06-01 09:04:01 +02:00
Maximiliano Sandoval
00acc7957f
gdkcursor: Fix typo in GdkCursorGetTestureCallback
2024-06-01 09:04:00 +02:00
Maximiliano Sandoval
a931335f24
gskglshader: Correct typo in source property
2024-06-01 09:04:00 +02:00
Maximiliano Sandoval
1ef320a9ec
gsktransform: Document constructor
2024-06-01 09:04:00 +02:00
Maximiliano Sandoval
411b7f12b5
gtkicontheme: Fix typo in return annotation
2024-06-01 09:03:59 +02:00
Maximiliano Sandoval
611fcfb1c7
gtkgraphicsoffload: Fix typo in prop name
2024-06-01 09:03:59 +02:00
Maximiliano Sandoval
6257a51f4f
gtkflowbox: Fix typos in annotations
2024-06-01 09:03:58 +02:00
Maximiliano Sandoval
e24630bd18
gtkenums: Correctly document AnnouncementPriority
2024-06-01 09:03:58 +02:00
Maximiliano Sandoval
6b0b3a4db7
gtkprintsettings: Delete extra whitespace
2024-06-01 09:03:58 +02:00
Maximiliano Sandoval
fd19c7c2ab
gtkscrolledwindow: Fix typo in docstring
2024-06-01 09:03:57 +02:00
Maximiliano Sandoval
4aa2206699
gtktextview: Fix typo Textview in docstrings
2024-06-01 09:03:57 +02:00
Maximiliano Sandoval
eae23ebf69
gtkbuilderscope: Correct the argument values
...
These should match the function arguments.
2024-06-01 09:03:56 +02:00
Maximiliano Sandoval
ecd27f6c3c
entry: Fix typos in tabs and show-emoji-icon
2024-06-01 09:03:56 +02:00
Maximiliano Sandoval
01f3c72338
sectionsmodel: Fix typo in docstring
2024-06-01 09:03:55 +02:00
Matthias Clasen
87be414c05
Merge branch 'color-fixes' into 'main'
...
Fix oklch conversion
See merge request GNOME/gtk!7324
2024-06-01 01:42:45 +00:00
Matthias Clasen
f6d676cc8a
inspector: Use gdk_rgba_print when suitable
2024-05-31 21:39:32 -04:00
Matthias Clasen
4961241f26
gsk: Use gdk_rgba_print when suitable
2024-05-31 21:39:04 -04:00
Matthias Clasen
60c944bb94
Add tests for color conversion and interpolation
...
Add some tests for gtk_css_color_convert and
gtk_css_color_interpolate, mostly based on examples
in the spec.
2024-05-31 21:29:49 -04:00
Matthias Clasen
740c10282f
Add gtk_css_color_print and gtk_css_color_to_string
...
These are useful for testing and debugging.
2024-05-31 21:29:49 -04:00
Matthias Clasen
3a4c69f370
gdk: Add gdk_rgba_print
2024-05-31 21:29:49 -04:00
Matthias Clasen
c3083572fb
css: Small api fix
...
This should have been const.
2024-05-31 21:29:49 -04:00
Matthias Clasen
8ecb00be66
css: Export some color value api for tests
...
Export enough api to test color conversion and interpolation.
2024-05-31 21:29:49 -04:00
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
Matthias Clasen
5aa47b6e45
Merge branch 'ebassi/doc-overview-link' into 'main'
...
docs: Fix link to the Pango reference
See merge request GNOME/gtk!7315
2024-05-30 03:45:13 +00:00
Matthias Clasen
3b40d95581
css: Fix currentcolor serialization
...
According to css specs, the serialization is supposed to be
all lowercase.
2024-05-29 21:45:10 -04:00
Matthias Clasen
3ad2d91e1c
Cosmetics
...
Fix minor style issues in gtkcsscolorvalue.c.
2024-05-29 21:44:47 -04:00
Matthias Clasen
d4c586e882
css: Simplify color values
...
Drop the last_value. We don't do that for any other types of
values, so lets not do it here either.
2024-05-29 21:36:10 -04:00
Emmanuele Bassi
612c547ed3
docs: Fix link to the Pango reference
...
Reported at: https://discourse.gnome.org/t/broken-link-https-docs-gtk-org-gtk4-overview-html/21223
2024-05-30 02:10:48 +01:00
Matthias Clasen
1a777ce7f3
Merge branch 'online-man-pages' into 'main'
...
docs: Install man pages as html
See merge request GNOME/gtk!7314
2024-05-30 00:18:01 +00:00
Matthias Clasen
7ec4f6e297
Merge branch 'wip/xdg-dialog' into 'main'
...
gdk/wayland: Implement support for xdg-dialog Wayland protocol
See merge request GNOME/gtk!6837
2024-05-29 23:40:39 +00:00
Matthias Clasen
afaa0f3afd
docs: Install man pages as html
...
This will let us link to them from the docs.
2024-05-29 19:30:09 -04:00
Matthias Clasen
8841a002ed
Merge branch 'build-with-unicode' into 'main'
...
Windows: Build with UNICODE
See merge request GNOME/gtk!7230
2024-05-29 23:20:01 +00:00
Matthias Clasen
6da606aaad
Merge branch 'issue-6401-legacy' into 'main'
...
Win32 GL: Also force not to use depth/stencil/accum bits on legacy contexts (for issue #6401 )
See merge request GNOME/gtk!7176
2024-05-29 23:18:04 +00:00
Matthias Clasen
51bd155670
Merge branch 'css-error-fixes' into 'main'
...
css: Propagate errors properly
See merge request GNOME/gtk!7313
2024-05-29 23:13:14 +00:00
Matthias Clasen
8fa16ec1cc
Merge branch '6332_fix_scale_highlight_clip' into 'main'
...
range: fix highlight clipping
Closes #6332
See merge request GNOME/gtk!7297
2024-05-29 21:03:11 +00:00
Matthias Clasen
04e5a0006d
Merge branch '6332_fix_progressbar_highlight_clip' into 'main'
...
progressbar: fix highlight clipping
Closes #6332
See merge request GNOME/gtk!7312
2024-05-29 20:54:04 +00:00
Matthias Clasen
a1d2169992
Document GTK_DEBUG_CSS
...
This was overlooked in b603479fe2 .
2024-05-29 15:47:40 -04:00
Matthias Clasen
778976f8da
css: Propagate errors properly
...
We should not change the domain and code when we propagate errors
that happen while parsing variable references.
Pointed out in https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/7308 .
2024-05-29 15:47:40 -04:00
g.willems
f81dea58a2
range: fix highlight clipping
...
Clipping on padding box prevents the scale highlight to fully paint itself
over the scale trough, including its border.
Use the border box instead.
Fixes #6332
2024-05-29 21:16:34 +02:00
g.willems
e82606a538
progressbar: fix highlight clipping
...
Clipping using OVERFLOW_HIDDEN relies on widget's padding box.
This prevents the highlight to paint itself over the trough's borders.
Use the border box instead, with a custom snapshot implementation.
Fixes #6332
2024-05-29 21:14:32 +02:00
Matthias Clasen
fe5b28f5b8
Merge branch 'bilelmoussaoui/add-since-annotations' into 'main'
...
gtk: Add missing docs blob to CssSection
See merge request GNOME/gtk!7296
2024-05-29 19:09:07 +00:00
Matthias Clasen
82fd0d7eef
Merge branch 'matthiasc/for-main' into 'main'
...
css: Fix serialization of oklab() etc
Closes #6748 , #6732 , and #6735
See merge request GNOME/gtk!7310
2024-05-29 17:08:38 +00:00
Matthias Clasen
16761fcb49
Merge branch 'wip/alice/color-func' into 'main'
...
csscolorvalue: Add color() support
See merge request GNOME/gtk!7286
2024-05-29 17:02:13 +00:00
Matthias Clasen
4fac5680fb
Merge branch 'css-error-docs' into 'main'
...
css: Clarify docs for GtkCssProvider::parser-error
See merge request GNOME/gtk!7309
2024-05-29 16:41:55 +00:00
Matthias Clasen
4ec4280e51
css: Clarify docs for GtkCssProvider::parser-error
...
Some of these errors should not be fatal.
Related: #6736
2024-05-29 12:35:14 -04:00
Matthias Clasen
15bb77472d
css: Add some parser tests for oklab() etc
2024-05-29 12:05:28 -04:00
Matthias Clasen
5c92d5e081
css: Fix serialization of oklab() etc
...
The spec requires that oklab() and oklch() are serialized as these
functions, while hwb() is serialized as rgb().
Fixes : #6748
2024-05-29 12:04:20 -04:00
Emmanuele Bassi
1626c5f1e7
css: Create a section if the variable does not have one
...
In case a variable definition does not have a CSS section associated to
it, we fall back to the previous behaviour of creating a CSS section
with the bounds of the error.
See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/841
2024-05-29 12:04:20 -04:00
Michael Weghorn
3b5f0ed05e
a11y: Use text instead of label for GtkLabel's a11y name
...
Update the `GTK_ACCESSIBLE_PROPERTY_LABEL` property
in `gtk_label_set_text_internal` using the new text
instead of using the label in
`gtk_label_set_label_internal`.
While the `label` "includes any embedded underlines
indicating mnemonics and Pango markup" [1], the
`text` is the "text is as it appears on screen" [2],
which is more suitable for the accessible name.
With this in place, the text is reported as the
accessible name again after
commit d5b34aecdd
Date: Wed Jan 17 12:49:38 2024 +0100
a11y: Remove special handling of accessible names for static text widgets
[1] https://docs.gtk.org/gtk4/method.Label.get_label.html
[2] https://docs.gtk.org/gtk4/method.Label.get_text.html
Fixes : #6732
Fixes : #6735
2024-05-29 12:04:20 -04:00
Chun-wei Fan
d2298f1c8f
gskvulkandevice.c: Put Vk[Pipeline|RenderPass] in structures
...
This way, we can simply duplicate the keys as separate pointers to store
the corresponding Vulkan handles so that we can safely hash them, as
Vulkan handles may or may not be pointers depending on the target
platform.
This will fix builds on 32-bit Windows at least.
2024-05-29 12:04:20 -04:00
Chun-wei Fan
085062ab89
gdkvulkancontext.c: Use pointers to hash VkShaderModule
...
VkShaderModule's may or may not be pointers depending on the target
platform, so use pointers to hash those handles to be safe, and retrieve
them from hashes accordingly.
Fixes build on 32-bit Windows at least.
2024-05-29 12:04:20 -04:00
Chun-wei Fan
9741082467
gskvulkanmemory.c: Use VK_NULL_HANDLE for VkDeviceMemory
...
...rather than NULL, so that things will build fine on non-LLP, non-64-bit
systems.
2024-05-29 12:04:20 -04:00
Benjamin Otte
3db4a05493
testsuite: Shrink maximum texture size in test
...
1MB textures can lead to 20s runtimes - which with asan CI being a lot
slower can be a loooong time and cause timeouts.
Limiting them to 16kB still allows hitting max texture size sometimes
but makes sure the test only runs for 3-4s worst case.
I hope that doesn't trigger timeouts even under asan.
2024-05-29 12:04:20 -04:00
Georges Basile Stavracas Neto
e3b9df2cec
filechooserwidget: Plug a bunch of GtkBitset leaks
...
gtk_selection_model_get_selection() is transfer full, and the returned
bitset must be freed by the caller. GtkFileChooserWidget freed none of
them.
Unref the bitsets.
Related: https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/91
2024-05-29 12:04:20 -04:00
Yosef Or Boczko
4a4e445a35
Update Hebrew translation
2024-05-29 12:04:20 -04:00
Chun-wei Fan
db0f9b60ac
gsk: Call glDeleteSync() directly
...
This function does not use the standard __cdecl calling convention on
Windows, meaning using g_clear_pointer() on it directly will cause
crashes on 32-bit Windows. Just call it directly if the GLsync it uses
exists.
2024-05-29 12:04:20 -04:00
Alice Mikhaylenko
d51de390ba
csscolorvalue: Add color() support
...
Currently we only have sRGB, so it's a bit redundant, but we'll need this
for color-mix()
Once we have more color spaces, they should be added here (presumably the
enum would be in GDK instead, and instead of GdkRGBA these colors would
have a GdkColor.
2024-05-29 19:28:31 +04:00
Matthias Clasen
c14e167a11
Merge branch 'ebassi/css-section-warning' into 'main'
...
css: Create a section if the variable does not have one
See merge request GNOME/gtk!7306
2024-05-29 14:01:55 +00:00
Emmanuele Bassi
2837a85461
Merge branch 'michaelweghorn/a11y_label_name' into 'main'
...
a11y: Update label's accessible name on text update
Closes #6732 and #6735
See merge request GNOME/gtk!7293
2024-05-29 12:35:40 +00:00
Benjamin Otte
282510e113
Merge branch 'vulkan-windows-32' into 'main'
...
Vulkan: Fix build on 32-bit Windows (and likely other non-64-bit LLP platforms)
See merge request GNOME/gtk!7299
2024-05-29 10:34:42 +00:00
Emmanuele Bassi
accabe3eee
css: Create a section if the variable does not have one
...
In case a variable definition does not have a CSS section associated to
it, we fall back to the previous behaviour of creating a CSS section
with the bounds of the error.
See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/841
2024-05-29 11:29:13 +01:00
Chun-wei Fan
9dbdbaca43
gskvulkandevice.c: Put Vk[Pipeline|RenderPass] in structures
...
This way, we can simply duplicate the keys as separate pointers to store
the corresponding Vulkan handles so that we can safely hash them, as
Vulkan handles may or may not be pointers depending on the target
platform.
This will fix builds on 32-bit Windows at least.
2024-05-29 18:16:22 +08:00
Chun-wei Fan
5935bc95b7
gdkvulkancontext.c: Use pointers to hash VkShaderModule
...
VkShaderModule's may or may not be pointers depending on the target
platform, so use pointers to hash those handles to be safe, and retrieve
them from hashes accordingly.
Fixes build on 32-bit Windows at least.
2024-05-29 18:03:13 +08:00
Chun-wei Fan
4c677e4dcd
gskvulkanmemory.c: Use VK_NULL_HANDLE for VkDeviceMemory
...
...rather than NULL, so that things will build fine on non-LLP, non-64-bit
systems.
2024-05-29 12:57:07 +08:00
Benjamin Otte
d4c25c9ec0
Merge branch 'wip/otte/for-main' into 'main'
...
testsuite: Shrink maximum texture size in test
See merge request GNOME/gtk!7303
2024-05-28 15:31:08 +00:00
Benjamin Otte
b69df2bc4d
testsuite: Shrink maximum texture size in test
...
1MB textures can lead to 20s runtimes - which with asan CI being a lot
slower can be a loooong time and cause timeouts.
Limiting them to 16kB still allows hitting max texture size sometimes
but makes sure the test only runs for 3-4s worst case.
I hope that doesn't trigger timeouts even under asan.
2024-05-28 16:51:03 +02:00
Luca Bacci
7f9363d471
Windows: Build with UNICODE
...
Build with UNICODE (and _UNICODE) defined when targeting Windows.
2024-05-28 16:37:48 +02:00
Emmanuele Bassi
01d86eab66
Merge branch 'gbsneto/bitset-filechooser-leaks' into 'main'
...
filechooserwidget: Plug a bunch of GtkBitset leaks
See merge request GNOME/gtk!7302
2024-05-28 13:16:39 +00:00
Yosef Or Boczko
09e85aa809
Update Hebrew translation
2024-05-28 08:54:43 +00:00
Georges Basile Stavracas Neto
d49816d2e6
filechooserwidget: Plug a bunch of GtkBitset leaks
...
gtk_selection_model_get_selection() is transfer full, and the returned
bitset must be freed by the caller. GtkFileChooserWidget freed none of
them.
Unref the bitsets.
Related: https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/91
2024-05-28 10:24:27 +02:00
Benjamin Otte
59a00d6768
Merge branch 'ngl-windows-32' into 'main'
...
Fix using the NGL renderer on 32-bit Windows
See merge request GNOME/gtk!7294
2024-05-28 04:39:43 +00:00
Alice Mikhaylenko
6bd6c6acba
colorutils: Add linear srgb conversion functions
2024-05-27 15:50:50 +04:00
Chun-wei Fan
be2ff60787
gsk: Call glDeleteSync() directly
...
This function does not use the standard __cdecl calling convention on
Windows, meaning using g_clear_pointer() on it directly will cause
crashes on 32-bit Windows. Just call it directly if the GLsync it uses
exists.
2024-05-25 11:07:37 +08:00
Bilal Elmoussaoui
070b9a87b6
gtk: Add missing docs blob to CssSection
...
For the missing Since annotations mostly.
2024-05-24 12:05:51 +02:00
Emmanuele Bassi
ecbe6a421e
Merge branch 'bilelmoussaoui/no-async-finish-docs' into 'main'
...
docs: Drop _finish blobs
See merge request GNOME/gtk!7295
2024-05-24 05:14:56 +00:00
Michael Weghorn
317e68a58c
a11y: Use text instead of label for GtkLabel's a11y name
...
Update the `GTK_ACCESSIBLE_PROPERTY_LABEL` property
in `gtk_label_set_text_internal` using the new text
instead of using the label in
`gtk_label_set_label_internal`.
While the `label` "includes any embedded underlines
indicating mnemonics and Pango markup" [1], the
`text` is the "text is as it appears on screen" [2],
which is more suitable for the accessible name.
With this in place, the text is reported as the
accessible name again after
commit d5b34aecdd
Date: Wed Jan 17 12:49:38 2024 +0100
a11y: Remove special handling of accessible names for static text widgets
[1] https://docs.gtk.org/gtk4/method.Label.get_label.html
[2] https://docs.gtk.org/gtk4/method.Label.get_text.html
Fixes : #6732
Fixes : #6735
2024-05-24 05:48:22 +02:00
Bilal Elmoussaoui
9b42377347
docs: Drop _finish blobs
...
As they are generated by gi-docgen thanks to the newly added async annotations.
It allows bindings that don't expose the _finish
functions to propose less-confusing docs
2024-05-23 20:39:50 +02:00
Andre Klapper
7372a845fb
Correct GNOME HIG 404 URI
2024-05-23 16:31:20 +02:00
Carlos Garnacho
cf8c3be030
gdk/wayland: Implement support for xdg-dialog Wayland protocol
...
This protocol lifts some functionality from the gtk-shell protocol,
namely the ability to tag dialogs as modal. Ensure to use this
new protocol if available for the task, instead of the gtk-shell
protocol.
2024-05-23 12:40:39 +02:00
Carlos Garnacho
4eb715cf81
build: Support in-tree copies of wayland protocols
...
Make the info about the required protocols an array of definitions
again (a dict instead of an array this time) and add a field that
may be used for version checks of the wayland-protocols found.
Also, make it possible to have versioned protocols in-tree. Both
of these things will allow us to ship in-tree copies of wayland-protocols
without necessarily having to bump the version we depend on.
2024-05-23 12:40:19 +02:00
Luca Bacci
d4899fdf1f
Merge branch 'gdk4_win32_fix_dnd_move_cursor' into 'main'
...
gdk4-win32: Guarantee dnd-move as a cursor name
See merge request GNOME/gtk!7289
2024-05-23 10:16:30 +00:00
Emmanuele Bassi
4142c4d79e
Merge branch 'mcatanzaro/#6734' into 'main'
...
text: fix critical in paste_received
Closes #6734
See merge request GNOME/gtk!7290
2024-05-22 23:17:15 +00:00
Matthias Clasen
ca442f8641
Merge branch 'css-color-spaces' into 'main'
...
gdk: Add support for some color conversions
See merge request GNOME/gtk!7285
2024-05-22 22:32:52 +00:00
Benjamin Otte
3c1491423a
Merge branch 'wip/otte/for-main' into 'main'
...
gsk: use the correct memory type index
See merge request GNOME/gtk!7287
2024-05-22 21:47:44 +00:00
Michael Catanzaro
eb4993d3fb
text: fix critical in paste_received
...
Here we calculate the length only in the truncate_multiline condition.
Then we pass pos - 1 to gtk_accessible_text_update_contents() as the end
position, triggering this critical that checks to ensure start <= end.
Fix it by always calculating the length of the string that we insert.
This is the first bug fixed as a result of enabling fatal criticals by
default in Epiphany! 🎉
Fixes #6734
2024-05-22 16:06:09 -05:00
g.willems
aa057da1ca
win32: Guarantee dnd-move as a cursor name
...
gdk currently falls back to the default cursor, which may not be
approriate for rendering a DnD move.
2024-05-22 20:55:21 +02:00
Matthias Clasen
1de09d59fb
css: Support some color spaces
...
Support the hwb(), oklab() and oklch() functions for specifying
colors in these color spaces.
See https://bottosson.github.io/posts/oklab/ and
https://www.w3.org/TR/css-color-4/ .
Some tests included.
2024-05-22 14:31:56 -04:00
Alejandro Piñeiro
130a6fe0cf
gsk: use the correct memory type index
...
https://gitlab.gnome.org/GNOME/gtk/-/issues/6726
2024-05-22 19:43:03 +02:00
Matthias Clasen
e1f7c027d7
Merge branch 'css-color-docs' into 'main'
...
css: Update docs slightly
See merge request GNOME/gtk!7281
2024-05-22 17:25:47 +00:00
Arjan Molenaar
396ef5ebe5
Merge branch 'macos-popup-shadows' into 'main'
...
macos: Take shadows into account when positioning popups
See merge request GNOME/gtk!7266
2024-05-22 13:15:34 +00:00
Emmanuele Bassi
840a20db3b
Merge branch 'macos-surface-critical' into 'main'
...
gdkmacossurface: Set surface before accessing it
See merge request GNOME/gtk!7267
2024-05-22 09:10:35 +00:00
Matthias Clasen
8c6f7d1ae9
Merge branch 'matthiasc/for-main' into 'main'
...
4.15.1
See merge request GNOME/gtk!7283
2024-05-22 00:00:21 +00:00
Matthias Clasen
c69fa6221b
Post-release version bump
2024-05-21 19:54:53 -04:00
Matthias Clasen
3c92c81705
4.15.1
2024-05-21 19:52:12 -04:00
Matthias Clasen
297de981c4
css: Update docs slightly
...
Add more details about units and calc(), mention new color
syntax and deprecations.
2024-05-21 17:11:30 -04:00
Matthias Clasen
53beb054b6
Merge branch 'wip/alice/colors' into 'main'
...
csscolorvalue: Actually discard invalid rgb() colors
See merge request GNOME/gtk!7282
2024-05-21 19:31:31 +00:00
Matthias Clasen
0431492284
Merge branch 'wip/alice/spinner' into 'main'
...
spinner: Only set :checked state when mapped
See merge request GNOME/gtk!7280
2024-05-21 18:54:17 +00:00
Alice Mikhaylenko
aed9cc1874
csscolorvalue: Actually discard invalid rgb() colors
2024-05-21 22:25:20 +04:00
Alice Mikhaylenko
c15804d124
spinner: Only set :checked state when mapped
...
Avoid doing the animation while it's invisible.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/1025
2024-05-21 19:33:52 +04:00
Matthias Clasen
1bd208d937
Merge branch 'wip/alice/colors' into 'main'
...
Add modern rgb() and hsl() syntax
See merge request GNOME/gtk!7278
2024-05-21 14:50:08 +00:00
Alice Mikhaylenko
b70bcd6bfe
csscolorvalue: Add modern rgb() and hsl() syntax
...
Make calc() work in colors too, since we need to support degrees for hsl()
hue anyway and it goes through the same machinery. Make that work for
legacy syntax too, matching the spec.
Ignore missing components/none for now.
Ignore gdk_rgba_parser_parse(), that's also used outside css.
2024-05-21 16:32:52 +04:00
Alice Mikhaylenko
74a1d45238
cssnumbervalue: Add get_canonical()
...
We'll need it to get angle values in degrees for color parsing.
2024-05-21 16:31:26 +04:00
Alice Mikhaylenko
3ada35460d
doc: Mention the rad unit
...
It was missing.
2024-05-21 16:31:26 +04:00
Matthias Clasen
1f133c3d64
Merge branch 'css-color-deprecations' into 'main'
...
Add gtk_css_parser_warn_deprecated
See merge request GNOME/gtk!7270
2024-05-21 10:57:12 +00:00
Matthias Clasen
4440ce874e
Merge branch 'nieldsg/font-filter' into 'main'
...
gtk: Introduce private GtkFontFilter helper
See merge request GNOME/gtk!7262
2024-05-21 01:22:38 +00:00
Matthias Clasen
db302df82a
Merge branch 'fix-a-css-crash' into 'main'
...
Fix an oversight
See merge request GNOME/gtk!7276
2024-05-21 00:58:02 +00:00
Matthias Clasen
b550b58e8f
Merge branch 'css-var-speedup' into 'main'
...
css: Speed up checking for var()
See merge request GNOME/gtk!7274
2024-05-21 00:57:47 +00:00
Matthias Clasen
ed889b951b
css: Deprecate named colors
...
Warn for uses of @name colors, since these should be replaced with
CSS variables and custom properties. We don't issue deprecation
warnings for @define-color uses, since we may want to keep these
around in theme CSS for a while, for backwards compatibility.
Update all affected tests.
2024-05-20 16:19:30 -04:00
Matthias Clasen
b603479fe2
Add a debug flag for CSS deprecations
...
It seems better not to spam everybody with this all the time.
2024-05-20 16:02:38 -04:00
Matthias Clasen
7c39b2cea3
Add gtk_css_parser_warn_deprecated
...
This will come in handy when we start deprecating our homegrown
CSS extensions.
2024-05-20 16:02:38 -04:00
Matthias Clasen
b1bce7a62b
Fix an oversight
...
GtkCssVariableValues are not GtkCssValues. Oops.
2024-05-20 16:02:38 -04:00
Matthias Clasen
fa73e17fba
Fix an oversight
...
GtkCssVariableValues are not GtkCssValues. Oops.
2024-05-20 15:56:40 -04:00
Matthias Clasen
dee2150a04
css: Speed up checking for var()
...
gtk_css_parser_has_references is meant to be a quick check for
whether a property value contains a variable reference, it just
returns a boolean and doesn't need to report any errors, so lets
not parse the property value any more than we need to.
2024-05-20 13:56:52 -04:00
Matthias Clasen
f647fc3fe2
Merge branch 'css-animation-optimization' into 'main'
...
css: Avoid more recomputation during animation
See merge request GNOME/gtk!7273
2024-05-20 17:06:10 +00:00
Matthias Clasen
6bae80c331
css: Avoid more recomputation during animation
...
Don't trigger recomputation if the values didn't change. We only
do this for custom values, since those are animated with a flip
at 50%, so it is likely that we see no-change updates.
2024-05-20 11:59:46 -04:00
Matthias Clasen
2aeb80f490
Merge branch 'ccs-math' into 'main'
...
css: Implement math functions
See merge request GNOME/gtk!7249
2024-05-20 14:40:48 +00:00
Matthias Clasen
8a2f434443
Merge branch 'css-animation-optimization' into 'main'
...
css: Less recomputation in animation
See merge request GNOME/gtk!7263
2024-05-20 14:26:18 +00:00
Matthias Clasen
d4134430fc
Merge branch 'matthiasc/for-main' into 'main'
...
css: Avoid a possible memory leak
See merge request GNOME/gtk!7272
2024-05-20 13:49:53 +00:00
Matthias Clasen
73f64971c8
css: Avoid a possible memory leak
...
Currently, style->variables is always NULL when we get here, but
better to be safe than sorry, and clear the fields before we
overwrite it.
2024-05-20 08:57:28 -04:00
Matthias Clasen
ecc2c953e5
css: Avoid more recomputation
...
Pass a reason into gtk_css_animated_style_recompute, and avoid
recomputing properties that aren't affected. The possible reasons
for now are that variables of color changes. Better tracking
for currentColor in properties will allow us to improve this
later.
2024-05-20 08:48:20 -04:00
Matthias Clasen
e353117937
css: Make animation recomputation more efficient
...
Use the same shorthand-keeping trick we do when computing
static styles.
2024-05-20 08:27:47 -04:00
Matthias Clasen
492ae6df35
css: Less recomputation in animation
...
Only recompute the animated style once all the custom variables
have been updated.
2024-05-20 08:27:47 -04:00
Matthias Clasen
a19d0471e9
Merge branch 'css-var-syntax-errors' into 'main'
...
css: Report some var() syntax errors
See merge request GNOME/gtk!7264
2024-05-20 12:21:18 +00:00
Matthias Clasen
5b5ba36999
Merge branch 'matthiasc/for-main' into 'main'
...
css: Add some more variables tests
See merge request GNOME/gtk!7268
2024-05-20 10:21:21 +00:00
Balázs Úr
89b64cbf47
Update Hungarian translation
2024-05-19 23:47:50 +00:00
Matthias Clasen
e65d1f2122
Cosmetics
2024-05-19 18:57:24 -04:00
Matthias Clasen
2756496d47
css: Cosmetics
...
Don't set the same field twice.
2024-05-19 18:04:20 -04:00
Matthias Clasen
8b653f21cc
Drop more underscores
...
Drop the remaining _'s from css number value apis.
2024-05-19 17:27:37 -04:00
Matthias Clasen
4e6759a126
css: Implement math functions
...
Implement the functions described in the "Mathematical
Expressions" section of the "CSS Values and Units Module
Level 4" spec, https://www.w3.org/TR/css-values-4/ .
Beyond calc(), which we already had, this includes
min(), max(), clamp(),
round(), rem(), mod(),
sin(), cos(), tan(), asin(), acos(), atan(), atan2(),
pow(), sqrt(), hypot(), log(), exp(),
abs(), sign(),
e, pi, infinity and NaN.
Some tests included.
2024-05-19 17:27:37 -04:00
Matthias Clasen
d20e0b0370
Merge branch 'gtk-4-macos-dock-quit' into 'main'
...
[GTK 4] macOS: Dock "Quit" invokes "app.quit" action
See merge request GNOME/gtk!7265
2024-05-19 21:06:11 +00:00
Mat
ed8255993f
gdkmacossurface: Set surface before accessing it
...
Silences the following critial:
_gdk_macos_surface_update_fullscreen_state: assertion
'GDK_IS_MACOS_SURFACE (self)' failed
2024-05-19 23:58:35 +03:00
Matthias Clasen
f5d69fa0c5
css: Add some more variables tests
...
Add a test mixing color expressions with variables, and
empty fallback values.
2024-05-19 16:39:02 -04:00
Mat
e1431f31c1
macos: Take shadows into account when positioning popups
...
Otherwise popups will be misaligned. This becomes noticeable when larger
shadows are used, like in libadwaita.
Regression in 08216dcee9
2024-05-19 23:35:18 +03:00
Thomas Holder
f191fc0047
macOS: Dock "Quit" invokes "app.quit" action
...
Allows the application to handle "Dock icon > Quit" the same as
"Application menu > Quit".
Requires GtkApplication's `register-session` property.
Suitable replacement for gtk-mac-integration's
`NSApplicationBlockTermination` signal.
2024-05-19 23:10:31 +03:00
Matthias Clasen
b60c60f03b
css: Report some var() syntax errors
...
Detect cases such as var(), var(-), var("a") or var(21) early
and report them as syntax errors.
Test included.
Related: #6715
2024-05-19 15:56:26 -04:00
Matthias Clasen
af0c277bba
Merge branch 'matthiasc/for-main' into 'main'
...
css: Lose more underscores
See merge request GNOME/gtk!7261
2024-05-19 05:14:05 +00:00
Niels De Graef
88203fbf4d
gtk: Introduce private GtkFontFilter helper
...
Extract the "user filter" code from the `GtkFontChooserWidget`, for a
couple of reasons:
* If we want to expand the filter in the future (e.g. to filter on
variable fonts, or check for multiple languages), we have a nice place
to put this.
* It simplifies the font chooser widget a tiny bit, as it's a pretty big
file which can be hard to follow.
* With a custom `GtkFilter` subclass, we can actually avoid doing a bit
of work when initially showing the widget, as we can return
`GTK_FILTER_MATCH_ALL` when nothing is selected yet (which is not
possible with a `GtkCustomFilter'). It's not much, but it's still nice
2024-05-18 15:34:13 +02:00
Matthias Clasen
970c9eef63
css: Use an anonymous union for color values
...
We already do this for number values, and it looks less messy.
2024-05-18 09:23:40 -04:00
Matthias Clasen
2439876bd3
css: Simplify color resolving a bit
...
We know the initial value of the color property, no need to
resolve it again.
2024-05-18 09:09:21 -04:00
Matthias Clasen
97582ae9ad
css: Simplify color resolving
...
The cycle argument is purely a detail of the internal implementation,
no need to have it in the api.
2024-05-18 09:03:57 -04:00
Matthias Clasen
a5b85f0dc5
css: Lose more underscores
...
Drop the _ from the color value apis. Update all callers.
2024-05-18 08:59:24 -04:00
Matthias Clasen
aefb16510b
Merge branch 'css-fiddling' into 'main'
...
css: Lose some underscores
See merge request GNOME/gtk!7255
2024-05-16 01:49:52 +00:00
Benjamin Otte
4360d433b5
Merge branch 'wip/otte/for-main' into 'main'
...
columnview: Actually check the listview in return_if_fail()
See merge request GNOME/gtk!7254
2024-05-16 01:30:20 +00:00
Matthias Clasen
5927319589
css: Inline a few functions
...
These are just operating on the value base and can easily be inlined.
2024-05-15 20:54:45 -04:00
Matthias Clasen
25db645f65
css: Lose some underscores
...
Drop the _ from all the gtk_css_value apis.
2024-05-15 20:54:43 -04:00
Benjamin Otte
b3c6a98132
vulkan: Add a missing extension
...
We need to enable this one, too.
Thanks validation layers!
2024-05-16 02:24:17 +02:00
Benjamin Otte
031109aec3
columnview: Actually check the listview in return_if_fail()
...
This was missed when adding return_if_fail()s in
172cdf8e21 .
Related: !7240
2024-05-16 02:24:17 +02:00
Jordi Mas i Hernandez
18d2f9c8a4
Update Catalan translation
...
(cherry picked from commit 27d75be15e )
2024-05-15 19:53:58 +00:00
Jordi Mas i Hernandez
0ae721f144
Update Catalan translation
...
(cherry picked from commit 8ccc36c389 )
2024-05-15 18:02:53 +00:00
Matthias Clasen
7898d1b46d
Merge branch 'wip/sophie-h/print' into 'main'
...
printdialog: Fix some annotiations
Closes #6709
See merge request GNOME/gtk!7251
2024-05-14 20:51:54 +00:00
Sophie Herold
3648398f6d
printsetup: Remove nullable from settings getters
...
GtkPrintSetup is initialized with the values returned from the portal.
Therefore the page setup and the print settings can never be NULL.
2024-05-14 22:21:19 +02:00
Sophie Herold
019916c5b9
printdialog: Remove nullable for GError functions
...
Functions that set a GError should not be marked as nullable if they
only return NULL on error.
2024-05-14 22:12:04 +02:00
Sophie Herold
ebb31590ae
printdialog: Add missing nullable to getters
...
The initial values are NULL.
2024-05-14 22:10:29 +02:00
Benjamin Otte
32ea1cf32d
Merge branch 'wip/kabus/scroll_to_null_tile' into 'main'
...
listbase: Fix a null dereference
See merge request GNOME/gtk!7240
2024-05-14 19:48:42 +00:00
Khalid Abu Shawarib
172cdf8e21
listbase: Return early on non-existent scroll position
2024-05-14 15:27:38 +03:00
Matthias Clasen
dc07bcf3a3
Merge branch 'michaelweghorn/a11y_atspi_map_level_property' into 'main'
...
a11y atspi: Map GTK_ACCESSIBLE_PROPERTY_LEVEL to AT-SPI attr
See merge request GNOME/gtk!6549
2024-05-13 16:02:53 +00:00
Matthias Clasen
bd96c10563
Merge branch 'matthiasc/for-main' into 'main'
...
testsuite: Improve test-css-parser
See merge request GNOME/gtk!7248
2024-05-13 14:57:15 +00:00
Matthias Clasen
76299396cf
testsuite: Improve test-css-parser
...
Make it so that --generate parse produces output that can be
directly pasted into the ref.css file.
2024-05-13 10:04:28 -04:00
Ekaterine Papava
a96dd2ad0a
Update Georgian translation
2024-05-13 00:45:14 +00:00
Matthias Clasen
1e210e83bb
Merge branch 'structcleanup' into 'main'
...
gdk: Remove unused struct 'XPointerUngrabInfo'
See merge request GNOME/gtk!7245
2024-05-12 04:52:19 +00:00
Dr. David Alan Gilbert
14f1a91bff
gdk: Remove unused struct 'XPointerUngrabInfo'
...
'XPointerUngrabInfo' appears unused since
commit 26cbf87d7d ("New approach for grab tracking code")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org >
2024-05-12 01:06:31 +01:00
Matthias Clasen
3f2bcdf82e
Merge branch 'matthiasc/for-main' into 'main'
...
wayland: Tweak cursor sizing code
See merge request GNOME/gtk!7244
2024-05-11 03:40:53 +00:00
Matthias Clasen
c61d8bc188
wayland: Tweak cursor sizing code
...
We want to take advantage of a viewporter also for named cursors.
2024-05-10 23:10:50 -04:00
Matthias Clasen
4e5976427b
NEWS: Updates
2024-05-10 21:47:44 -04:00
Matthias Clasen
7fcdb0205f
Merge branch 'wip/alice/css-variables' into 'main'
...
CSS custom properties/variables
See merge request GNOME/gtk!6540
2024-05-11 01:38:10 +00:00
Benjamin Otte
4814c5f653
array: Don't overflow array size
...
Copy what gcc's libstdc++ does for vectors to avoid overflows:
1. Define a max size macro and assert against it
Note that we don't assert but actually check, because this needs
to abort even if assertions are disabled.
2. Don't do fancy math to compute new capacity.
Just size *= 2 instead and be careful about overflow.
2024-05-10 21:22:03 -04:00
Alice Mikhaylenko
eb24e3548f
inspector: Sort GTK CSS properties between standard and custom ones
2024-05-10 18:29:48 +04:00
Alice Mikhaylenko
87f0f374a9
inspector: Show custom properties for css nodes
2024-05-10 18:29:48 +04:00
Alice Mikhaylenko
0cd95951e6
testsuite: Add css variables tests
2024-05-10 18:29:48 +04:00
Matthias Clasen
c45815c217
css: Improve error reporting for variables
...
Emit errors for all the variables that were being expanded
if an error occurs while parsing a property value at compute time.
Include the variables that are being expanded in the error message.
2024-05-10 18:29:48 +04:00
Matthias Clasen
b914869715
css parser: Keep variables for tokenizers
...
Add a function that gets the names of the variables that the
parser is currently in the process of expanding. This will
be used for error reporting.
2024-05-10 18:29:48 +04:00
Matthias Clasen
ff5699e097
css parser: Inline the tokenizer array
...
This is in preparation of associating more data with the token streams.
2024-05-10 18:29:47 +04:00
Matthias Clasen
8846f85874
css provider: Set bytes on sections
...
Pass the bytes we're parsing to the sections, and keep a pointer
to them around, so we can compare them in the has_section
implementation.
This commit also corrects some of the location information that
we add into the section for variables to be more accurate.
2024-05-10 18:29:47 +04:00
Matthias Clasen
fc1c6cfb1a
css parser: Add gtk_css_parser_get_bytes
...
Gets the bytes that the parser is operating on.
2024-05-10 18:29:47 +04:00
Matthias Clasen
77028362ab
css provider: Set sections on all variable values
...
We were doing it in one case, but forgetting it in another.
These sections are necessary to report meaningful error locations
when parsing property values at compute time.
2024-05-10 18:29:47 +04:00
Matthias Clasen
496aee5b02
style cascade: Propagate errors
...
When we compute values, the provider we use ends up being the
style cascade. If we hit a parser error when parsing variable-bearing
property values at compute time, we emit the error on that provider.
By making the cascade propagate the error back to the proper css
provider that contains the section in question, we get it reported
back to the css editor in the inspector.
2024-05-10 18:29:47 +04:00
Matthias Clasen
b2fb624496
style provider: Add a has_section api
...
Add gtk_style_provider_has_section and implement it for
GtkCssProvider. This will be used later to direct error
emissions to the right provider.
2024-05-10 18:29:47 +04:00
Matthias Clasen
f2ef5d85ea
css parser: Add bytes to sections
...
We will use this later to link sections back to the providers
they come from.
2024-05-10 18:29:47 +04:00
Matthias Clasen
7eca32edf0
css parser: Add gtk_css_parser_skip_whitespace
...
Does what it says.
2024-05-10 18:29:47 +04:00
Matthias Clasen
7775bcf2fb
css: Don't accept junk
...
Check that there is no junk at the end of the property value
when parsing variable-bearing properties at compute time.
2024-05-10 18:29:47 +04:00
Alice Mikhaylenko
ed35f6f8b8
css: Condense compute parameters into GtkCssComputeContext
...
That list is getting out of hand, let's make it a struct.
2024-05-10 18:29:47 +04:00
Matthias Clasen
307942e1f7
css: Only compute shorthand values once
...
When computing a style, only compute the shorthand value once.
2024-05-10 18:29:47 +04:00
Alice Mikhaylenko
92b7231168
csskeyframes: Support variables
2024-05-10 18:29:47 +04:00
Alice Mikhaylenko
14d7eb97d2
cssanimation: Recompute values while playing
...
This will be necessary for supporting variables in animations.
For this we need to pass all the gtk_css_value_compute() parameters into
GtkCssAnimatedStyle: parent style and provider.
2024-05-10 18:29:47 +04:00
Alice Mikhaylenko
fed1c3d3fc
cssstaticstyle: Split property lists into a separate header
...
We'll need to use them in GtkCssAnimatedStyle too.
2024-05-10 18:29:47 +04:00
Alice Mikhaylenko
e1ac97a185
cssvalue: Pass an extra GtkCssVariableSet to compute()
...
We'll need this to support variables in @keyframes, since styles will
need to combine their own variables and the ones from the keyframes.
See the next commit, this one is split out to avoid a huge diff.
2024-05-10 18:29:47 +04:00
Alice Mikhaylenko
08a48dd97e
Implement basic support for CSS variables
2024-05-10 18:29:47 +04:00
Matthias Clasen
50df3ebb46
css: Give shorthand properties an ID
...
This will be used in future commits.
2024-05-10 18:29:47 +04:00
Alice Mikhaylenko
df77f22740
cssvalue: Add contains_variables()
...
We'll need this to know which values to recompute for animations.
It will be used in the next commit, it's separate to avoid the diff
being too large.
2024-05-10 18:29:47 +04:00
Alice Mikhaylenko
2437a551ec
csstokenizer: Add save() and restore()
...
We'll need that to check if property values contain variables.
2024-05-10 18:29:47 +04:00
Alice Mikhaylenko
46ab71fc8a
cssprovider: Copy bytes when loading
...
We'll need to keep accessing them later to compute values with variables,
so we can't avoid this anymore.
2024-05-10 18:29:47 +04:00
Matthias Clasen
f922ff8597
Merge branch 'speed-up-cairo-icons' into 'main'
...
gsk: Speed up mask nodes with cairo
Closes #6700
See merge request GNOME/gtk!7243
2024-05-10 14:10:18 +00:00
Matthias Clasen
690c06109e
gsk: Speed up mask nodes with cairo
...
Switch symbolc icon drawing from color-matrix to mask nodes
make the performance of the iconscroll demo crater (from 60fps
to 10fps).
Apply the same optimization we already have for color-matrix
nodes when drawing mask nodes. This gets us back to 60fps.
Fixes : #6700
2024-05-10 07:24:25 -04:00
Matthias Clasen
94505987fe
Merge branch 'matthiasc/for-main' into 'main'
...
css parser: Fix a typo
See merge request GNOME/gtk!7241
2024-05-10 04:11:08 +00:00
Matthias Clasen
c6d7b704cb
css parser: Fix a typo
...
Due to an ARAY vs ARRAY mishap, we weren't actually preallocating
any blocks. Fix that, and reduce the number of preallocated blocks
to 12. That seems sufficient, since parsing the Default theme never
needs more than 5 blocks.
2024-05-09 23:26:55 -04:00
Hugo Carvalho
349509c332
Update Portuguese translation
...
(cherry picked from commit 40e99590e7 )
2024-05-09 16:01:52 +00:00
Matthias Clasen
84fd420271
Merge branch '6674_fix_flickering_tooltip' into 'main'
...
tooltip: query tooltip on widget under pointer only
Closes #6674
See merge request GNOME/gtk!7237
2024-05-08 00:43:05 +00:00
Matthias Clasen
0c40defaf1
Merge branch 'realize_accessible_before_add_event_emission' into 'main'
...
a11y: Realize the AT context before firing a children added event for it
See merge request GNOME/gtk!7229
2024-05-08 00:42:33 +00:00
Matthias Clasen
cda1733fc7
Merge branch 'css-parser-block-array' into 'main'
...
css parser: Use a GdkArray for blocks
See merge request GNOME/gtk!7236
2024-05-07 23:15:31 +00:00
Matthias Clasen
0ee851c8c7
Merge branch 'matthiasc/for-main' into 'main'
...
icontheme: Clarify docs a bit
See merge request GNOME/gtk!7234
2024-05-07 18:57:24 +00:00
g.willems
d665274eb1
tooltip: query tooltip on widget under pointer only
...
When changing the tooltip text or markup of widget A, we simulate a
motion event on that widget to update the display.
But if there is an active tooltip on widget B, then the current code
belives we moved the pointer from B to A thus hides/shows the tooltip
of B alternatively.
Instead, simulate the motion event on the widget currently under the pointer.
This will avoid flickering if we keep the pointer over widget B.
Fixes #6674
Closes #6674
2024-05-07 19:32:15 +02:00
Matthias Clasen
ed3b73871f
css parser: Small optimization
...
Avoid creating a GFile until it is needed.
2024-05-07 12:34:37 -04:00
Matthias Clasen
e570eb4f86
css parser: Use a GdkArray for blocks
...
This avoids some allocations, and is typesafe.
2024-05-07 12:34:36 -04:00
Lukáš Tyrychtr
81b6251073
a11y: Realize the AT context before firing a children added event for it
...
This allows, with some other changes, AdwToasts to be read on appearance by Orca.
2024-05-07 15:49:59 +02:00
Matthias Clasen
cfaf619620
icontheme: Clarify docs a bit
...
Mention that 'desired size' is in application pixels.
Related: !7056
2024-05-06 20:37:34 -04:00
Benjamin Otte
de5b6764bc
Merge branch 'wip/otte/for-6694' into 'main'
...
dmabuf: Ref previous context
Closes #6694
See merge request GNOME/gtk!7232
2024-05-06 22:56:05 +00:00
Benjamin Otte
bc17dfa83d
dmabuf: Ref previous context
...
In case the context's only reference was held by being the current
context, setting the new context would free it.
Resetting it later would then be a use-after-free.
Fixes #6694
2024-05-07 00:34:47 +02:00
Matthias Clasen
84a98f74c1
Merge branch 'fix-test-breakage' into 'main'
...
Fix recent test breakage
See merge request GNOME/gtk!7233
2024-05-06 21:56:13 +00:00
Matthias Clasen
50facedc47
Fix recent test breakage
...
I neglected to fix affected tests in 76b0687467 , since
ci was down at the time. Sorry about that.
2024-05-06 17:11:44 -04:00
Matthias Clasen
32a4f805b8
gsk: Require dmabuf support for Vulkan
...
Don't use the Vulkan renderer if Vulkan doesn't support any
dmabuf formats.
2024-05-05 15:19:17 -04:00
Matthias Clasen
200cacc3ad
Merge branch 'matthiasc/for-main' into 'main'
...
inspector: Show more key event details
See merge request GNOME/gtk!7224
2024-05-05 17:29:29 +00:00
Matthias Clasen
eed3cab29f
Merge branch 'list-item-factory-docs' into 'main'
...
docs: Clarify types for BuilderListItemFactory
See merge request GNOME/gtk!7226
2024-05-05 15:00:49 +00:00
Matthias Clasen
76b0687467
Put newlines before base64 blobs
...
This makes things look a bit cleaner in the node editor, since
the first line no longer sticks out.
2024-05-05 10:16:01 -04:00
Matthias Clasen
5039dc40f8
Merge branch 'main' into 'main'
...
vulkan: Don't queue presentation if image acquisition fails
See merge request GNOME/gtk!7204
2024-05-05 04:06:44 +00:00
Doğukan Korkmaztürk
7c3de4a2da
vulkan: Recreate swapchain when it is necessary or beneficial
...
Currently, GTK does not check the result of vkAcquireNextImageKHR() and
assumes that it always succeeds. As a result, the vkQueuePresentKHR() is
unconditionally set to wait for the semaphore passed to
vkAcquireNextImageKHR() earlier.
However, if vkAcquireNextImageKHR() fails for some reason, the semaphore
passed to it does not get signalled. This causes the presentation
command to wait for the semaphore to be signalled indefinitely, which
causes GTK to hang.
This change adds error handling around vkAcquireNextImageKHR() to make
GTK recreate the Vulkan swapchain when it is necessary or beneficial and
helps avoiding situations that could cause indefinite waits.
2024-05-04 22:14:33 -04:00
Matthias Clasen
b486e9b760
inspector: Show more key event details
...
Consumed modifiers are relevant to understanding why shortcut
do or do not match, so show them.
2024-05-04 21:29:40 -04:00
Matthias Clasen
ce2fd8a0d0
NEWS: Updates
2024-05-04 21:29:40 -04:00
Hugo Carvalho
99b1b26fdb
Update Portuguese translation
...
(cherry picked from commit a249b58094 )
2024-05-04 22:23:06 +00:00
James Westman
b7e4bbaf74
docs: Clarify types for BuilderListItemFactory
...
The docs for GtkBuilderListItemFactory previously stated that the
template must extend GtkListItem. However, this is not always true.
GtkListView has headers which must extend GtkListHeader, and
GtkColumnView has its own types.
Clarified this in the GtkBuilderListItemFactory docs, and specified the
expected types in the GtkColumnView, GtkListView, and GtkGridView docs.
2024-05-04 13:20:41 -05:00
Matthias Clasen
f579b171a9
Merge branch 'gbsneto/more-win32-cleanups' into 'main'
...
Various cleanups around Win32
See merge request GNOME/gtk!7223
2024-05-03 17:27:05 +00:00
Georges Basile Stavracas Neto
f9929d15eb
gtk-demo: Remove set-but-unused variable
2024-05-03 12:30:39 -03:00
Georges Basile Stavracas Neto
c45a6ad52d
gsk/gpu: Use G_GSIZE_FORMAT for printing gsizes
...
On Windows, gsize is a long long unsigned. The compiler complains about
that.
Use G_GSIZE_FORMAT which translates to %llu on Windows, %lu on most
platforms, and sometimes just %u on rare cases.
2024-05-03 12:30:39 -03:00
Matthias Clasen
7233e38aa8
Merge branch 'gbsneto/cleanup-meson-profiler' into 'main'
...
testsuite: Remove leftover code from meson.build
See merge request GNOME/gtk!7222
2024-05-03 13:44:07 +00:00
Benjamin Otte
73ba97acd9
Merge branch 'duplicate-gl-version' into 'main'
...
glcontext: Remove duplicate check for GL version
See merge request GNOME/gtk!7221
2024-05-03 13:42:03 +00:00
Georges Basile Stavracas Neto
7d2ad604d2
win32/vulkancontext: Remove unused variable
...
Silences a compiler warning.
2024-05-03 09:52:57 -03:00
Georges Basile Stavracas Neto
45e64b915c
win32/wgl: Initialize hwnd to NULL
...
Otherwise there's a valid code path that may return it uninitialized.
2024-05-03 09:51:46 -03:00
Georges Basile Stavracas Neto
ebaef9f18b
win32/cursor: Ignore GdkPixbuf deprecation warning
...
Seems harmless to ignore this for now, other bits of code also ignore
this.
2024-05-03 09:49:46 -03:00
Robert Ancell
c73fe8ac4a
glcontext: Remove duplicate check for GL version
2024-05-03 16:40:01 +12:00
Georges Basile Stavracas Neto
8ed8f883d1
testsuite: Remove leftover code from meson.build
...
Performance tests were dropped at 5dd0d39a6b . The 'profiler' option
was renamed to 'sysprof' by commit e915a1aa7f .
2024-05-02 20:28:27 -03:00
Matthias Clasen
032a5afc20
Merge branch 'accessible_help_text' into 'main'
...
accessible help text
See merge request GNOME/gtk!6992
2024-05-02 17:20:17 +00:00
Matthias Clasen
0064500146
Merge branch 'michaelweghorn/a11y_role_mapping' into 'main'
...
a11y atspi: Improve mapping for container roles
See merge request GNOME/gtk!7209
2024-05-02 01:33:02 +00:00
Matthias Clasen
4582ddcad9
Merge branch 'matthiasc/for-main' into 'main'
...
gtk-demo: Name some idles
See merge request GNOME/gtk!7218
2024-05-02 01:30:42 +00:00
Matthias Clasen
8bb2720494
icontheme: Move css style code where it belongs
...
Move gtk_icon_theme_lookup_symbolic_colors to gtkcssstyle.c, and
rename it to gtk_css_style_lookup_symbolic_colors.
Update all callers.
2024-05-01 16:06:16 -04:00
Matthias Clasen
3b8218a99e
gtk-demo: Name some idles
...
These show up in profiles, so give them a name.
2024-05-01 16:06:16 -04:00
Matthias Clasen
9a8fa8dd82
Merge branch 'wip/chergert/fix-6684' into 'main'
...
undo: fix off-by-one when prepending to inline string
Closes #6684
See merge request GNOME/gtk!7217
2024-05-01 19:50:23 +00:00
Matthias Clasen
d6892c85dc
Merge branch 'serialize-hint-metrics' into 'main'
...
gsk: Serialize hint metrics too
See merge request GNOME/gtk!7215
2024-05-01 18:40:13 +00:00
Christian Hergert
d3c20c3269
undo: fix off-by-one when prepending to inline string
...
This fixes the conditional in istring_prepend() to match other uses,
notably to match istring_append().
Fixes #6684
2024-05-01 11:28:55 -07:00
Matthias Clasen
9904259661
gsk: Serialize hint metrics too
...
We need this to ensure that we properly roundtrip text nodes
without any changes.
2024-05-01 14:00:18 -04:00
Emin Tufan Çetin
a8fcde11de
Update Turkish translation
2024-05-01 16:19:02 +00:00
Matthias Clasen
d2d4cd64cd
Merge branch 'no-a11y-focus-events' into 'main'
...
a11y: Stop emitting Focus events
See merge request GNOME/gtk!7213
2024-05-01 15:18:42 +00:00
Matthias Clasen
2c7e68d98f
Merge branch 'matthiasc/for-main' into 'main'
...
Revert "gdk/frameclock: add mark when we discover frames may drop"
See merge request GNOME/gtk!7214
2024-05-01 12:43:52 +00:00
Matthias Clasen
6f42f8ef2c
Revert "gdk/frameclock: add mark when we discover frames may drop"
...
This reverts commit 84a304e66e .
This produces marks that are confusing to me. They don't correlate
with actual gaps in the frame cycle and often overlap with regular
'window presented' marks. Also, the function we are emitting these
marks from is called from the get_frame_time getter, and we
definitely don't want to emit marks from there.
2024-05-01 08:03:16 -04:00
Matthias Clasen
152dd70cde
a11y: Drop the Focus event from the interface too
...
We don't use it anymore.
2024-05-01 07:57:19 -04:00
Matthias Clasen
8ec1045c87
a11y: Stop emitting Focus events
...
These have been deprecated for a long time, and we have been asked
to stop emitting them.
Related: #454
2024-05-01 07:55:47 -04:00
Matthias Clasen
46866b8a66
Merge branch 'matthiasc/for-main' into 'main'
...
vulkan: Improve logging around caches
See merge request GNOME/gtk!7208
2024-04-30 16:11:25 +00:00
Matthias Clasen
9df6f802f2
gtk-demo: Better accessibility for the sidebar
...
Add an accessible description saying how many search reasults
we have. This is an experiment.
Related: #6678
2024-04-30 11:54:56 -04:00
Michael Weghorn
ad8613876c
a11y atspi: Improve mapping for container roles
...
GTK_ACCESSIBLE_ROLE_GENERIC is for
"a nameless container that has no semantic meaning of its own",
for which AT-SPI role ATSPI_ROLE_PANEL [1]
("A generic container that is often used to group
objects.") fits better than ATSPI_ROLE_FILLER
("A object that fills up space in a user interface."),
so map to this one.
With this in place, widgets like GtkBox are again
reported with the panel role on AT-SPI level after
commit a86923de94
("a11y: Change the role for many containers"),
whose commit message suggests that the change
on the AT-SPI level was unintended.
For GTK_ACCESSIBLE_ROLE_GROUP, use the corresponding
ATSPI_ROLE_GROUPING ("A group of related widgets.
This group typically has a label.").
[1] https://docs.gtk.org/atspi2/enum.Role.html
2024-04-30 14:44:11 +02:00
Matthias Clasen
1bbca0cd25
vulkan: Don't forget to update the cache size
...
In order for the size change check to make sense, vk_pipeline_cache_size
needs to correspond to the size of the cache we last wrote to disk.
We were forgetting to update it after saving the cache, so the
check was ineffective.
2024-04-30 08:28:39 -04:00
Matthias Clasen
83784c17a3
vulkan: Improve logging around caches
...
Add some more logging around the pipeline cache.
2024-04-30 08:28:39 -04:00
Matthias Clasen
3f46d0f2fa
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Improve logging
See merge request GNOME/gtk!7207
2024-04-30 11:59:06 +00:00
Matthias Clasen
ef1ff8313f
gsk: Improve logging
...
Log the shader compilation with sufficient detail.
2024-04-30 07:36:42 -04:00
Matthias Clasen
119a07e055
vulkan: Add a profiler mark for pipeline cache save
...
This is a rare event, and the file isn't small, so show it in profiles.
2024-04-30 07:36:42 -04:00
Matthias Clasen
abfd94d2d9
Merge branch 'matthiasc/for-main' into 'main'
...
vulkan: Add profiling to Vulkan initialization
See merge request GNOME/gtk!7205
2024-04-29 23:09:15 +00:00
Matthias Clasen
6022fbcdf8
vulkan: Add profiling to Vulkan initialization
...
This helps understanding where our startup time is spent.
2024-04-29 18:28:03 -04:00
Matthias Clasen
744016e768
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Drop statistics from GSK_DEBUG=renderer
See merge request GNOME/gtk!7203
2024-04-29 18:30:59 +00:00
Benjamin Otte
d39f50a4ee
Merge branch 'wip/otte/for-main' into 'main'
...
dmabuf: Use narrow range instead of full range
Closes #6672
See merge request GNOME/gtk!7202
2024-04-29 16:28:28 +00:00
Matthias Clasen
c23d3c4406
gsk: Add debug spew to renderer selection
...
Reshuffle things a bit and make GSK_DEBUG=renderer print out
more information about why renderers were skipped or selected.
2024-04-29 12:28:15 -04:00
Matthias Clasen
1e2eae4ddf
gsk: More detailed debug spew
...
Include information about why a renderer was selected in
GSK_DEBUG=renderer.
2024-04-29 12:12:22 -04:00
Matthias Clasen
77eb3df7c0
gsk: Drop statistics from GSK_DEBUG=renderer
...
This only works with the old gl renderer, and it interferes with
the setup information that is printed by that category.
2024-04-29 12:12:22 -04:00
Matthias Clasen
e540022869
x11: Implement a missing method
...
Vulkan on X11 was getting spew for missing an empty_frame
implementation.
2024-04-29 12:12:22 -04:00
Benjamin Otte
e6700405c9
dmabuf: Use narrow range instead of full range
...
It's way more common, and Mutter uses it, too.
Avoid visual glitches when going in/out of offload.
Fixes #6672
2024-04-29 14:30:56 +02:00
Artur S0
5bbd8e12fa
Update Russian translation
2024-04-29 11:59:09 +00:00
Matthias Clasen
8b59771cd1
Merge branch 'matthiasc/for-main' into 'main'
...
inspector: Cosmetics
See merge request GNOME/gtk!7199
2024-04-29 10:27:26 +00:00
Matthias Clasen
8a0a08e4ce
Merge branch 'only-fg-symbolics' into 'main'
...
Reencode all our symbolic pngs
See merge request GNOME/gtk!7196
2024-04-29 10:27:16 +00:00
Matthias Clasen
bef6352401
More consistency fixes for texture utils
...
Be consistent about filename vs path.
2024-04-29 00:42:49 -04:00
Matthias Clasen
60a43ddce0
All non-integral scales in texture utils
...
This might be used with fractional scales in the future.
2024-04-29 00:35:27 -04:00
Matthias Clasen
90c9e88ee9
scaler: Consistency fixes
...
Follow the pattern that we use in GDK:
scale_factor = int
scale = double
2024-04-29 00:35:27 -04:00
Matthias Clasen
d860bf95ab
Consistency fixes for texture utils
...
Use the with_fg naming consistently.
2024-04-29 00:35:27 -04:00
Matthias Clasen
a3bd0a3e17
gsk: Cosmetics
...
Tweak a profiler counter name.
2024-04-28 23:54:55 -04:00
Matthias Clasen
d274c7df06
testsuite: Make offload tests more robust
...
Skip the offload tests when we find ourselves in situations
where offloading won't work.
2024-04-28 23:54:55 -04:00
Matthias Clasen
9a5f482e1a
reftests: Stop using xpm images
...
We are phasing out the fringe pixbuf loaders, so xpm is going
away as a default-supported image format.
2024-04-28 23:54:55 -04:00
Matthias Clasen
2f6140c066
docs: Clarify the cairo interaction section
...
This was giving outdated advice.
2024-04-28 23:54:55 -04:00
Matthias Clasen
9ce4471527
Speed up symbolic svg loading
...
If the svg doesn't use the symbolic style classes, we can avoid
loading it multiple times.
This brought the time for loading system-run-symbolic at 256@2
from 6.8ms down to 2ms.
2024-04-28 23:54:03 -04:00
Matthias Clasen
cda4ec48b2
Merge branch 'doc-fixes' into 'main'
...
gskpathbuilder: Fix doc typo
See merge request GNOME/gtk!7200
2024-04-29 03:52:04 +00:00
Matthias Clasen
d9582c123e
inspector: Cosmetics
...
We've been using title capitalization and spelled out names
in the node details pane, so be consistent.
2024-04-28 23:44:18 -04:00
Matthias Clasen
4d30aacb0c
Reencode all our symbolic pngs
...
This adds the only-foreground information and will let us use
these symbolics more efficiently.
2024-04-28 23:42:02 -04:00
Matthias Clasen
4862c3f779
Add 'only foreground' to texture utility api
...
Add an 'only_fg' argument to all our internal texture utility
api, so GtkIconTheme can find out if a symbolic png or svg uses
colors beyond the foreground or not.
This information is used in gtk_symbolic_paintable_snapshot_symbolic
to optimize rendering of such symbolic icons.
2024-04-28 23:42:02 -04:00
Matthias Clasen
08d1353cde
loaders: Make it possible to load png options
...
We want to store some metadata in our symbolic pngs, so make it
possible to get options when loading a png, along with the texture.
Update all callers.
2024-04-28 23:42:02 -04:00
Matthias Clasen
585dadf575
Small optimization
...
Avoid copying a potentially large blob more than necessary.
2024-04-28 23:42:02 -04:00
Joshua Lee
d069eb173a
path builder: Fix doc typo
2024-04-28 22:24:38 +01:00
Matthias Clasen
6015560b63
Merge branch 'wip/otte/for-main' into 'main'
...
various fixes
Closes #6668 and #6656
See merge request GNOME/gtk!7194
2024-04-28 19:44:58 +00:00
Benjamin Otte
5a776389d7
reftests: Use longer words when testing wrapping
...
"Hello" might be shorter than "Hi Ho" in some fonts and then that one
gets wrapped, too.
So choose perfectly cromulent words for this purpose instead.
2024-04-28 13:51:42 +02:00
Benjamin Otte
6c2dfed5a5
inspector: Add details for textures
...
In particular, add all the dmabuf texture details.
I originally wanted this just to see if a texture was the type I
expected it to be while debugging, but then I thought "why not add the
rest, too?"
I did not add GL-internal texture details (like GL format,
internalformat etc), because that would require a make_current().
2024-04-28 13:51:42 +02:00
Benjamin Otte
7dec24c2cc
inspector: Make add_text_row() be a printf-style function
...
There's a few cases where I had to add "%s" as the format string, but
most changes got rid of printf() + free() combinations.
2024-04-28 13:51:42 +02:00
Benjamin Otte
c20e7a0c5d
glcontext: Split dmabuf import codepaths
...
Use different codepaths for known formats vs unknown formats.
Be more careful with unknown formats and always import them as
GL_TEXTURE_EXTERNAL_OES when possible (GL can't do EXTERNAL) to avoid
problems.
This is a more defensive approach towards older drivers that don't
support modifiers.
This fixes importing YUV textures on AMD Gen8.
Another approach would be to check for YUV and never try
GL_TEXTURE_2D with them, but I decided to go this way first.
Fixes #6668
2024-04-28 13:51:42 +02:00
Benjamin Otte
719021e1f4
gpu: Handle tiny offscreens
...
Due to rounding errors, it is possible after intersecting a lot of
rectangles to end up with a tiny size for an offscreen. And because we
allow an epsilon before ceil()ing to an integer (see commit afc7b46264
for details) it is now possible that we end up with a size of 0.
Avoid that by always enforcing a minimum size of 1px.
Test included
The test uses a different codepath to arrive at the same problem - it
specifies the small size instead of triggering it via rounding errors
and clipping like the original bug (and most likely the more common case
to encounter this problem.
Fixes #6656
2024-04-28 13:51:42 +02:00
Benjamin Otte
4856e115a9
path: document enum
2024-04-28 08:33:03 +02:00
Matthias Clasen
bfb5bbe862
Merge branch 'matthiasc/for-main' into 'main'
...
wayland: Break out dmabuf feedback code
See merge request GNOME/gtk!7193
2024-04-27 23:09:20 +00:00
Matthias Clasen
b98c86fb7b
wayland: Break out dmabuf feedback code
...
This will need to be used in surfaces as well, in the future.
Prepare for that by moving this code into its own file and struct.
2024-04-27 11:47:26 -04:00
Matthias Clasen
e01c3f581e
Merge branch 'fix-profiler-mark' into 'main'
...
gsk: Fix a profiler mark
See merge request GNOME/gtk!7192
2024-04-27 15:47:01 +00:00
Matthias Clasen
c45199e388
gsk: Fix a profiler mark
...
I messed this up in f26efd9adf .
2024-04-27 10:23:45 -04:00
Matthias Clasen
27fb9917d8
Merge branch 'matthiasc/for-main' into 'main'
...
atcontext: Add a few missing values
Closes #6575
See merge request GNOME/gtk!7190
2024-04-26 23:16:31 +00:00
Matthias Clasen
b5d6613a3f
atcontext: Add a few missing values
...
Add a missing value to the naming array, and sort the recent additions
alphabetically.
Fixes : #6575
2024-04-26 18:46:00 -04:00
Matthias Clasen
5dc77edbe3
Merge branch 'matthiasc/for-main' into 'main'
...
linkbutton: Report errors
Closes #6446
See merge request GNOME/gtk!7189
2024-04-26 22:26:14 +00:00
Matthias Clasen
a3d63b3579
label: Report errors
...
Print a warning when launching a handler fails.
2024-04-26 17:25:27 -04:00
Matthias Clasen
57c12a8661
linkbutton: Report errors
...
Print a warning when launching a handler fails.
Fixes : #6446
2024-04-26 17:25:13 -04:00
Matthias Clasen
f1ccb9b81a
Merge branch 'vulkan-gl-texture-warning' into 'main'
...
vulkan: Add a warning about GL textures
See merge request GNOME/gtk!7184
2024-04-26 20:16:27 +00:00
Matthias Clasen
2711cb8dcd
Merge branch 'wip/xdg-activation-token' into 'main'
...
Improve xdg-activation-token handling for non-dbus activation
See merge request GNOME/gtk!7118
2024-04-26 18:32:08 +00:00
Matthias Clasen
c79925bd4a
Merge branch 'listview-oversights' into 'main'
...
listview: Fix some oversights
See merge request GNOME/gtk!7187
2024-04-26 18:27:49 +00:00
Matthias Clasen
05d5860dc0
listview: Fix some oversights
...
The list factory widget was notifying the wrong properties.
2024-04-26 11:19:59 -04:00
Matthias Clasen
a1fdf06d80
gsk: Add a warning for inefficient texture import
...
With GSK_DEBUG=fallback, warn if a non-memory texture has to be
downloaded for importing it into Vulkan or GL.
2024-04-26 11:04:47 -04:00
Matthias Clasen
36d7ca058e
Cosmetics
2024-04-26 10:59:21 -04:00
Matthias Clasen
2e08db91ca
Merge branch 'offload-snapshot-no-child' into 'main'
...
Don't crash if snapshotting a GtkGraphicsOffload without child
See merge request GNOME/gtk!7183
2024-04-25 20:46:31 +00:00
Sebastian Dröge
2c9b47ff3c
Don't crash if snapshotting a GtkGraphicsOffload without child
2024-04-25 22:46:35 +03:00
Matthias Clasen
62ad1a61dc
Merge branch 'matthiasc/for-main' into 'main'
...
offload: Make logging more compact
See merge request GNOME/gtk!7181
2024-04-25 03:01:44 +00:00
Matthias Clasen
3fc9de7539
offload: Make logging more compact
...
Use a format of
[XXX] SYMBOL DETAILS
where SYMBOL indicates the offloading status:
🗙 - no offload
▲ - offload above, with background
△ - offload above, no background
▼ - offload below, with background
▽ - offload below, no background
2024-04-24 22:01:56 -04:00
Matthias Clasen
1c9a55d185
Merge branch 'vulkan-msvc' into 'main'
...
gskvulkandescriptors.c: Don't return value from void-rettype function
See merge request GNOME/gtk!7175
2024-04-25 01:37:49 +00:00
Matthias Clasen
492940205e
Merge branch 'amolenaar/macos-fix-nsapp-shortcuts' into 'main'
...
macos: fix in-app native shortcuts (regression)
See merge request GNOME/gtk!7178
2024-04-25 01:35:59 +00:00
Arjan Molenaar
985e4906c8
macos: Add some docs for the different NSEvent getters
2024-04-24 23:49:37 +02:00
Benjamin Otte
e9dcf8167c
Merge branch 'gbsneto/vulkan-dmabuf-general' into 'main'
...
vulkan/image: Use GENERAL for initial layout of DMA-BUF textures
See merge request GNOME/gtk!7179
2024-04-24 20:55:51 +00:00
Georges Basile Stavracas Neto
3aa6c27c26
vulkan/image: Use GENERAL for initial layout of DMA-BUF textures
...
The VK_IMAGE_LAYOUT_UNDEFINED layout means that the data hold by the
texture can be discarded, and we don't want to discard it. Because the
Vulkan spec is unclear (see [1] for a discussion), err on the side of
caution and use VK_IMAGE_LAYOUT_GENERAL.
Fixes import failures with WebKit.
[1] https://github.com/ValveSoftware/gamescope/issues/356
2024-04-24 17:21:51 -03:00
Emmanuele Bassi
f537a55b71
Coding style fixes
2024-04-24 11:57:00 +01:00
Emmanuele Bassi
7075e6be89
Merge branch 'gst-backend-msvc' into 'main'
...
GStreamer media backend: Fix building on Visual Studio
See merge request GNOME/gtk!7174
2024-04-24 10:04:11 +00:00
Chun-wei Fan
54a86a2a7e
Win32 GL: Also force not to use depth/stencil/accum bits on legacy contexts
...
For completeness' sake, also specifiy in the PIXELFORMATDESCRIPTOR to use no
depth, stencil and accum bits to initializing WGL when we can't (yet) use
wglChoosePixelFormatARB(), as we must always fist have a base legacy WGL
context using ChoosePixelFormat() before we can use that to use
wglChoosePixelFormatARB(), or if wglChoosePixelFormatARB() is somehow not
available for us.
Some drivers, however, enforces enabling depth buffers, so if we can't
acquire a pixel format that disables depth buffers, retry acquiring one
with that, which sadly is not optimal but we must make do.
Attempts to complete fix for issue #6401 .
2024-04-24 16:23:17 +08:00
Chun-wei Fan
016354b6dd
gskvulkandescriptors.c: Don't return value from void-rettype function
...
Fixes builds on Visual Studio with Vulkan enabled, as later GLib releases
consider this as an error on Visual Studio builds.
2024-04-24 16:19:43 +08:00
Chun-wei Fan
1dfc6d65df
GStreamer media backend: Fix building and running on Windows
...
Visual Studio (and possibly other non-GCC compilers) do not like
uses of #-preprocessor directives in macro usage (warning C5101: use of
preprocessor directive in function-like macro argument list is undefined
behavior is also shown), so fix the build by defining another macro
accordingly.
2024-04-24 16:15:32 +08:00
Matthias Clasen
b7d0295481
Merge branch 'macos-default-settings' into 'main'
...
macos: Respect the default-settings debug key
See merge request GNOME/gtk!7173
2024-04-23 16:38:00 +00:00
Matthias Clasen
a2854af325
macos: Respect the default-settings debug key
...
This makes our behavior more consistent across platforms.
The suggestion came up in discussion in #6545 .
2024-04-23 07:52:25 -04:00
Changwoo Ryu
320496b039
Update Korean translation
...
(cherry picked from commit e1dafd7a5d )
2024-04-23 11:33:48 +00:00
Lukáš Tyrychtr
b0450d4b1b
Do not perform a changed help-text check twice
2024-04-23 11:40:51 +02:00
Lukáš Tyrychtr
91ff8bf336
The new member needs a separate docblock
2024-04-23 11:40:51 +02:00
Emmanuele Bassi
7b145f72dc
Apply review feedback fixes
2024-04-23 11:40:51 +02:00
Lukáš Tyrychtr
0dcc21b605
4.14 did not cut it
2024-04-23 11:40:51 +02:00
Lukáš Tyrychtr
bd43a9e868
Document the new property
2024-04-23 11:40:51 +02:00
Lukáš Tyrychtr
9bf23d80a1
Test the new property and fix oversights found by the test
2024-04-23 11:40:51 +02:00
Lukáš Tyrychtr
38fd66dc04
a11y: Support setting the accessible help text
...
This adds support for setting a string used to describe the operation of a control,
if there's something special about it.
This is mapped to the HelpText property in the AT-SPI2 backend,
and has equivalent in others.
2024-04-23 11:40:51 +02:00
Arjan Molenaar
f004f14b89
macos: fix in-app native shortcuts (again)
...
Popping an event of the queue in the IMContext handler
prevents it from being forwarded to the NSApp, in case the
(key) event was not handled by IMContext.
So I reverted to a mix of the original (4.13) and new (4.14.1) behavior
for fetching events: NSEvent lookup for IMContext uses loose matching,
so it can work with rewritten events. When sending events to NSApp, only
we're checking for an exact match.
Now in-app keyboard shortcuts (e.g. Ctrl-F2) work from within text
fields again.
2024-04-23 08:57:09 +02:00
Matthias Clasen
8f15f6959c
Merge branch 'vulkan-profiler-mark' into 'main'
...
gsk: Add a profiler mark for pipeline creation
See merge request GNOME/gtk!7172
2024-04-23 01:19:20 +00:00
Matthias Clasen
f26efd9adf
gsk: Add a profiler mark for pipeline creation
...
This is the Vulkan equivalent of shader compilation, it could be
expensive, so lets add a mark around it.
2024-04-22 20:47:25 -04:00
Matthias Clasen
3f342d75b2
Merge branch 'wip/alice/root-test' into 'main'
...
testsuite: Add css/style/root test
See merge request GNOME/gtk!7171
2024-04-22 20:26:46 +00:00
Alice Mikhaylenko
3ab189404e
testsuite: Add css/style/root test
...
Should have been a part of 76421847a5
but I forgot to commit it.
2024-04-22 21:34:50 +04:00
Matthias Clasen
48fc8d6606
Merge branch 'wip/alice/root' into 'main'
...
cssselector: Support :root
See merge request GNOME/gtk!7170
2024-04-22 16:26:18 +00:00
Matthias Clasen
2e0f411de9
Merge branch 'amolenaar/macos-fix-delayed-rendering' into 'main'
...
macos: Avoid repeatedly sending events back to macOS
See merge request GNOME/gtk!7158
2024-04-22 16:25:57 +00:00
Matthias Clasen
f08e36e225
Merge branch 'wip/alice/bugfix' into 'main'
...
csstokenizer: Fix an out of bounds when reading an ident followed by EOF
See merge request GNOME/gtk!7169
2024-04-22 16:25:17 +00:00
Matthias Clasen
9f358ac655
Merge branch 'matthiasc/for-main' into 'main'
...
roaring: Fix some ubsan warnings
See merge request GNOME/gtk!7165
2024-04-22 15:52:04 +00:00
Matthias Clasen
33d1349e53
Merge branch 'wip/alice/wayland-crash' into 'main'
...
wayland: Consistently handle enum type
Closes #6649
See merge request GNOME/gtk!7168
2024-04-22 15:25:31 +00:00
Sebastian Wick
6b2b6ceb74
gdk: Consider XDG_ACTIVATION_TOKEN for the startup notification id
...
We prefer it over the old DESKTOP_STARTUP_ID environment variable if we
have it and it is valid.
We have to stash and unset XDG_ACTIVATION_TOKEN in addition to
DESKTOP_STARTUP_ID now as well. This makes sure that we don't call any
library functions which might rely on some environment variables. This
way unsetting the environment variables is safe and we can then
afterwards validate and print warnings.
2024-04-22 17:13:21 +02:00
Alice Mikhaylenko
76421847a5
cssselector: Support :root
...
This will be useful for defining global variables.
2024-04-22 18:55:35 +04:00
Alice Mikhaylenko
840cd6e44c
csstokenizer: Fix an out of bounds when reading an ident followed by EOF
2024-04-22 17:59:29 +04:00
Arjan Molenaar
f81038e99a
macos: Avoid repeatedly sending events back to macOS
...
in the old approach it was possible that one NSEvent was
sent to the underlying NSApp multiple times. This resulted in
those events being forwarded to our (glib) event queue again.
The visual result was that no screen updates were done. Under the hood
the application was very busy with passing events around.
By popping the events off of our event queue, we make sure they're sent
only once.
2024-04-22 15:51:12 +02:00
Alice Mikhaylenko
007e7c68dc
wayland: Consistently handle enum type
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/6649
2024-04-22 17:18:11 +04:00
Emmanuele Bassi
e5e147ad53
Merge branch 'wip/alice/flatpak-fix' into 'main'
...
Fix flatpak build
See merge request GNOME/gtk!7166
2024-04-22 13:04:33 +00:00
Alice Mikhaylenko
58e00040e0
Fix flatpak build
...
Regressed in 70cd0e28ab
2024-04-22 16:18:58 +04:00
Matthias Clasen
5d1b8399fb
testsuite: Fix another ubsan warning
...
The expression here was a bit too dense for ubsan to figure out
what branches aren't hit.
2024-04-21 22:24:02 -04:00
Matthias Clasen
deec2b6c6c
lsan: Don't suppress glib and gio leaks
...
These are useful to see and not all that common.
2024-04-21 22:02:44 -04:00
Matthias Clasen
246eb8ea25
gtk: Fix more ubsan warnings
...
Most of these are calling a get_instance_private() function before
checking that the object isn't NULL.
2024-04-21 22:01:06 -04:00
Matthias Clasen
815df9a76a
wayland: Fix an ubsan warning
...
dev_t requires 8-byte alignment, so we need to use memcpy.
2024-04-21 21:32:41 -04:00
Matthias Clasen
f896dddadc
inspector: Fix an ubsan warning
...
These values are too big for int, so cast them to double.
2024-04-21 21:21:11 -04:00
Matthias Clasen
d733e94a8b
roaring: Fix some ubsan warnings
...
Avoid warnings about memcpy (NULL, NULL, 0).
2024-04-21 21:20:16 -04:00
Matthias Clasen
59db0ca328
Merge branch 'matthiasc/for-main' into 'main'
...
wayland: Use wl_compositor version 6
See merge request GNOME/gtk!7164
2024-04-22 01:00:22 +00:00
Matthias Clasen
3bd97590a1
wayland: Tweak a debug message
...
We aren't drawing to subsurfaces.
2024-04-21 20:37:45 -04:00
Matthias Clasen
722a0fa36d
wayland: Check subsurface backgrounds better
...
Do the same checks for background coordinates that we do for the
subsurface coordinates themselves: they must be integral in both
application and device pixels.
2024-04-21 20:33:29 -04:00
Matthias Clasen
b21708c5e4
offload: Consolidate logging a bit
...
Spew a bit less per-frame. Unfortunately, we still spew for
every frame, and fixing that would require more extensive
refactoring to centralize all logging in gskoffload.c
2024-04-21 20:18:38 -04:00
Matthias Clasen
b5fb584316
wayland: Use gdk_debug_message consistently
...
For debug messages, we should always use gdk_debug_message.
2024-04-21 19:41:49 -04:00
Matthias Clasen
fd1e1b9b7c
Cosmetics
2024-04-21 19:35:52 -04:00
Matthias Clasen
c0caae0ff0
wayland: Use wl_compositor version 6
...
This gives us events for preferred_buffer_scale (which we ignore)
and preferred_buffer_transform (which we also currently ignore).
2024-04-21 19:27:58 -04:00
Matthias Clasen
5c972e4786
Post-release version bump
2024-04-21 12:27:05 -04:00
Matthias Clasen
1a3c5cf420
4.15.0
2024-04-21 12:21:40 -04:00
Matthias Clasen
eb7affd911
testsuite: Fix the offload tests
2024-04-21 12:21:40 -04:00
Matthias Clasen
a05dbff2c9
testsuite: Tweak the offload tests
...
We set GDK_DEBUG=force-offload now, so we can look at the actual
offload status.
2024-04-21 12:21:40 -04:00
Matthias Clasen
4b0d17b332
wayland: Fix an offload cornercase
...
Treat textures with background as opaque for the purposes of
offloading.
2024-04-21 12:21:40 -04:00
Matthias Clasen
2d8f677e63
Merge branch 'matthiasc/for-main' into 'main'
...
build: Fix docs build
See merge request GNOME/gtk!7162
2024-04-21 15:25:37 +00:00
Matthias Clasen
b5c9b6aa25
docs: Some updates to the render tool manpage
...
List all supported output formats and fix a few typos.
2024-04-21 11:03:31 -04:00
Matthias Clasen
86924c2f9a
docs: Add some metadata to man pages
...
It would be nice to include the version here, but that is trickier.
2024-04-21 11:03:14 -04:00
Matthias Clasen
af0f5e3f30
build: Fix docs build
...
There was an overlooked used of a dropped option here.
2024-04-21 10:15:06 -04:00
Matthias Clasen
9e6c72210d
Merge branch 'fix-dconf-reference' into 'main'
...
docs: Improve a reference
Closes #6635
See merge request GNOME/gtk!7161
2024-04-21 14:03:37 +00:00
Matthias Clasen
ce0b2d6953
NEWS: Updates
2024-04-21 09:40:55 -04:00
Matthias Clasen
d1bb3f66ac
ci: Use pangos documentation option
...
The gtk_doc option has been deprecated in pango.
Use the replacement to avoid a deprecation warning.
2024-04-21 09:40:55 -04:00
Matthias Clasen
70cd0e28ab
Drop deprecated build options
...
These cause harm in connection with subprojects if the subprojects
yield to a deprecated option. So just rip the bandaid off and
drop the deprecated build options.
2024-04-21 09:40:55 -04:00
Matthias Clasen
2e00bcc580
docs: Improve a reference
...
DConf is not what we use, it is actually GSettings.
Fixes : #6635
2024-04-20 20:12:54 -04:00
Matthias Clasen
db68c1f2c6
NEWS: Updates
2024-04-20 19:14:54 -04:00
Matthias Clasen
e3fa60a070
Merge branch 'matthiasc/for-main' into 'main'
...
ci: Stop using deprecated options
See merge request GNOME/gtk!7160
2024-04-20 22:35:20 +00:00
Matthias Clasen
c9c29d8bde
gsk: Only prefer Vulkan on Wayland
...
Make Vulkan the default on Vulkan-friendly platforms.
For now, that list only includes Wayland.
2024-04-20 18:10:21 -04:00
Matthias Clasen
cd59d62947
Merge branch 'offload-new-transfer-none' into 'main'
...
Drop return value annotation of gtk_graphics_offload_new()
See merge request GNOME/gtk!7159
2024-04-20 21:26:03 +00:00
Sebastian Dröge
4f4fe4ef44
Drop return value annotation of gtk_graphics_offload_new()
...
A floating reference is returned, not a full reference. By having no
annotation, like for all other widget constructors, the correct default
is used again.
2024-04-20 22:45:15 +03:00
Matthias Clasen
06f83847c6
ci: Stop using deprecated options
...
A small step towards being able to drop these eventually.
2024-04-20 13:44:08 -04:00
Matthias Clasen
941b5c2aeb
NEWS: Updates
2024-04-20 12:45:32 -04:00
Matthias Clasen
d661b7f258
Merge branch 'docs-tweaks' into 'main'
...
docs: Tweaks
See merge request GNOME/gtk!7157
2024-04-20 14:15:30 +00:00
Matthias Clasen
f86d996d58
NEWS: Updates
2024-04-20 09:18:03 -04:00
Matthias Clasen
fe3031fb99
docs: Tweaks
...
Shuffle the gtk-font-rendering docs around a bit.
2024-04-20 09:10:57 -04:00
Matthias Clasen
4b001a24db
Merge branch 'vulkan-by-default' into 'main'
...
gsk: Change the default renderer
Closes #6537
See merge request GNOME/gtk!7153
2024-04-20 13:09:02 +00:00
Matthias Clasen
4727fea631
Merge branch 'textview-text-shadow' into 'main'
...
Apply css text shadows in text views
See merge request GNOME/gtk!7154
2024-04-20 13:06:54 +00:00
Matthias Clasen
7ff4cba624
Apply css text shadows in text views
...
For now, this just applies the shadow from the widget's style,
there is no way to apply different shadows to text ranges (except
for the selection, which already has its own css style).
2024-04-20 08:48:39 -04:00
Matthias Clasen
0363cc83b9
Merge branch 'deprecate-cursor-theme-setters' into 'main'
...
gdk: Deprecate public cursor theme setters
See merge request GNOME/gtk!7155
2024-04-20 12:40:25 +00:00
Matthias Clasen
c1327e2c1b
gdk: Deprecate public cursor theme setters
...
No need for this api, we've made the frontend setter private
for a reason.
2024-04-20 07:50:10 -04:00
Aurimas Černius
9971707544
Update Lithuanian translation
...
(cherry picked from commit 49046f5c34 )
2024-04-20 10:39:37 +00:00
Matthias Clasen
02115912aa
Cosmetics
2024-04-19 20:52:57 -04:00
Martin
e29571e6a6
Update Slovenian translation
2024-04-19 21:46:32 +00:00
Matthias Clasen
582ad79088
gsk: Change the default renderer
...
The intent of this change to get wider testing and verify that the
Vulkan drivers we get to use in the wild are good enough for our
needs. If significant problems show up, we will revert this change
for 4.16.
The new preference order is vulkan > ngl > gl > cairo.
The gl renderer is still there because we need it to support gles2.
If you need to override the default renderer choice, you can
still use the GSK_RENDERER environment variable.
Fixes : #6537
2024-04-19 13:50:40 -04:00
gayathri.berli@ibm.com
06351844bb
changes to fix the memorytexture regression
2024-04-18 17:13:41 +05:30
Michael Weghorn
bcf78aeb39
a11y atspi: Map GTK_ACCESSIBLE_PROPERTY_LEVEL to AT-SPI attr
...
Map GTK_ACCESSIBLE_PROPERTY_LEVEL to the corresponding
AT-SPI object attribute "level", as it is specified
e.g. in the Core Accessibility Mappings 1.2 for the
"aria-level" attribute, for both, headings [1] and
non-headings [2].
This e.g. makes reporting the header level via
AT-SPI work for the gtk4-based LibreOffice variant
when combined with the corresponding LibreOffice
change [3] to set the GTK_ACCESSIBLE_PROPERTY_LEVEL
property.
For a related discussion, see issue #6196 .
[1] https://www.w3.org/TR/core-aam-1.2/#ariaLevelHeading
[2] https://www.w3.org/TR/core-aam-1.2/#ariaLevel
[3] https://gerrit.libreoffice.org/c/core/+/159216
2023-11-09 17:21:00 +01:00