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