Matthias Clasen
aa8ada3fed
widget: Add a convenience api to activate actions
...
Since actions are used increasingly, we should
have a convenient way to trigger an action in
the context of a widget.
2019-04-28 23:19:05 +00:00
Matthias Clasen
3643a9fe86
Merge branch 'focus-cleanup' into 'master'
...
Focus cleanup
See merge request GNOME/gtk!788
2019-04-28 23:17:46 +00:00
Matthias Clasen
25f4bb2e17
Avoid critical warnings
...
These critical warnings break the tests, otherwise.
2019-04-28 22:55:43 +00:00
Matthias Clasen
3b62d9c027
Drop gtk_window_activate_focus
...
This api wasn't used anywhere in GTK. And since
we've dropped the variant for the default widget,
this one should go too. If it is needed, it should
become and action too.
2019-04-28 22:21:09 +00:00
Matthias Clasen
c92938b378
widget: Remove special handling of has-focus
...
We used to handle has-focus in ui files specially.
It was awkward, so stop doing that. If you need
to influence the initial focus of a window, you
can just set the focus-widget property.
2019-04-28 22:21:03 +00:00
Matthias Clasen
c98313016e
window: Fix up the buildable implementation
...
We were assuming that the parent class has a custom
set_property, which may not be the case. Be more
careful.
2019-04-28 22:20:55 +00:00
Matthias Clasen
b6c1786165
inspector: Make property list sortable again
...
We lost this when moving from a treeview to
a listbox. Bring it back, with homegrown list
headers.
2019-04-28 21:56:10 +00:00
Matthias Clasen
ff604e1906
file chooser: Stay focused
...
When hitting Escape in the location entry,
we were not moving the focus anywhere,
causing focus to be NULL, and key bindings
to stop working. The visible effect was
that Ctrl-L / Escape / Ctrl-L would not
get back to the location entry, as expected.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1851
2019-04-28 16:08:21 +00:00
Matthias Clasen
34974a8a66
Merge branch 'wip/baedert/filechooser2' into 'master'
...
Assorted filechooser improvements
See merge request GNOME/gtk!783
2019-04-28 15:33:07 +00:00
Matthias Clasen
b9467a4dc7
file chooser: Prevent accidental search
...
When hitting Escape, the file chooser will go
into search mode, because the search entry
consumes the key to emit the ::search-stopped
signal. Recognize this situation and avoid
switching to search mode in this case.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1850
2019-04-28 15:20:07 +00:00
Timm Bäder
5a1c37a8c8
filechooserwidget: Use a center box for the search entry
...
This way we can avoid a slight position offset when we show or hide the
spinner during a search.
2019-04-28 11:30:13 +02:00
Timm Bäder
b75bc8aa64
filechooserwidget: Allow keynav from the treeview to the search entry
2019-04-28 11:27:42 +02:00
Timm Bäder
ed4c08d9b3
window: Check whether the new focus widget is the old one
...
We generally do that for all properties.
2019-04-28 11:27:21 +02:00
Timm Bäder
929cdd9259
treeview: Don't always grab_focus() when moving the cursor
...
This doesn't really make sense, we can assume that the treeview already
has the focus when it receives key events.
2019-04-28 11:26:40 +02:00
Timm Bäder
78049f452a
filechooserwidget: Remove unneeded function prototype
2019-04-28 11:08:09 +02:00
Timm Bäder
cf2ef4863b
filechooserwidget: Don't focus treeview when searching
...
It's just weird that the search entry does not have focus while we type.
2019-04-28 11:07:14 +02:00
Timm Bäder
2bd348558e
filechooserwidget: Remove some GdkEvent usage
2019-04-28 11:05:37 +02:00
Timm Bäder
0f6d83bb5f
filechooserbutton: Remove some dead code
2019-04-28 11:02:59 +02:00
Timm Bäder
7e20232607
colorbutton: Remove unneeded snapshot implementation
2019-04-28 10:55:10 +02:00
Timm Bäder
dcc55e3a73
Adwaita: Bring filechooserbutton spacing back
...
Add some space between the icons and the text, like there was in gtk3.
2019-04-28 10:40:54 +02:00
Timm Bäder
59fd48cee0
entry: Fix primary icon allocation in RTL entries
...
The primary icon is on the right in RTL, so don't offset the text child
to the right for it.
Fixes the text and icon overlapping in the second entry
in tests/testentryicons
2019-04-28 08:36:36 +02:00
Timm Bäder
1e16cb088a
treeview: Always update expand when allocating columns
...
It doesn't make sense to keep track of all the last_* values anymore now
that widgets only get allocated when their size changes anyway.
Remove all the associated (and thus now unused) flags as well.
2019-04-28 06:54:10 +02:00
Timm Bäder
f4cf43359d
treeview: Remove a useless check
2019-04-28 06:50:57 +02:00
Timm Bäder
6c8a5f5e2f
treeview: Remove unused member
2019-04-28 06:45:33 +02:00
Matthias Clasen
936aba884a
Merge branch 'file-chooser-search' into 'master'
...
file chooser: Fix Ctrl-L
Closes #1829
See merge request GNOME/gtk!781
2019-04-27 17:52:02 +00:00
Matthias Clasen
eea1388cf4
file chooser: Fix Ctrl-L
...
We were forwarding key events to the search entry
and unconditionally considered search started
afterwards. That is not correct, since things
like a Ctrl key press should not trigger search.
Fix this by only switching to search mode when
the event was actually consumed.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1829
2019-04-27 17:43:59 +00:00
Matthias Clasen
6277f2fccc
fontchooser: Fix type-to-search
...
The key capture was interfering with other
entries in the dialog, so be smarter about
when we want to capture keys and when we
don't.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1842
2019-04-27 15:59:45 +00:00
Timm Bäder
cc4b3798e5
searchentry: Always measure and allocate icon
...
Just measuring it (so the warning goes away) but then not using the
values will later underallocate the text widget.
Instead, always reserve space for the icon (which will inevitable be
visible as soon as the searchentry is actually being used).
Fixes #1831
2019-04-27 08:40:33 +02:00
Timm Bäder
8634a51aa5
Adwaita: separate '.view text' from textview>text
...
The first rule breaks GtkText inside GtkSearchEntry inside something
that has .view applied, as found in the file chooser when searching.
2019-04-27 08:40:33 +02:00
Timm Bäder
4bb6e70d01
tooltip: Initialize tooltip coords to given event coords
...
Otherwise the coordinates passed to the query-tooltip signal are always
0.
2019-04-26 18:05:32 +02:00
Matthias Clasen
2bd9b42479
Merge branch 'wip/surface-transform-data' into 'master'
...
Surface transform listener fixes
See merge request GNOME/gtk!776
2019-04-25 16:42:42 +00:00
Jonas Ådahl
3a1ef7aa2c
widget: Move surface relative transform fields into its own struct
...
The purpose being to reduce the size of GtkWidgetPrivate. What is left
is a pointer to the allocated struct.
2019-04-25 16:02:19 +02:00
Jonas Ådahl
1ad406e15d
widget: Remove leftover parent-changed handler removal
...
It was never added, as the listener was replaced by explicit code in
gtk_widget_(un)root(), but the removal code was left in place in error.
2019-04-25 14:29:19 +02:00
Matthias Clasen
b9770fa752
widget: Drop gtk_widget_set_parent_surface
...
And the getter, too. Widgets no longer have
extra surfaces that could serve as parent surfaces.
2019-04-24 20:57:09 -04:00
Matthias Clasen
52d4bcf1be
popover: Stop using gtk_widget_get_parent_surface
...
We can just use the surface of the parent.
2019-04-24 20:57:09 -04:00
Matthias Clasen
33f034d0d7
a11y: Stop using gtk_widget_get_parent_surface
...
We can just use the surface of the parent.
2019-04-24 20:54:05 -04:00
Matthias Clasen
2516f1142d
Merge branch 'wip/widget-position-changed-callbacks' into 'master'
...
widget: Add surface relative position changed callback
See merge request GNOME/gtk!760
2019-04-24 19:26:27 +00:00
Matthias Clasen
ec37e1e462
Merge branch 'fix-and-improve-linked-button-style' into 'master'
...
themes: Fix and improve linked button style
Closes #1294
See merge request GNOME/gtk!730
2019-04-24 19:23:12 +00:00
Matthias Clasen
79180f62d7
Merge branch 'wip/jimmac/type-experiments' into 'master'
...
Adwaita: generic type styles
See merge request GNOME/gtk!772
2019-04-24 19:08:40 +00:00
Jakub Steiner
5cd4ec510d
Adwaita: generic type styles
...
- try to define a basic typographic structure
See https://gitlab.gnome.org/GNOME/gtk/issues/1808
2019-04-24 19:23:05 +02:00
Kjell Ahlstedt
c21063e71e
csserror: Add G_BEGIN_DECLS and G_END_DECLS
...
Necessary when the header file is included in C++ code.
Merge request !773
2019-04-24 16:32:54 +02:00
Jonas Ådahl
477ad2505b
widget: Add surface relative transform changed callback
...
Added two new private GtkWidget API:
* gtk_widget_add_surface_transform_changed_callback()
* gtk_widget_remove_surface_transform_changed_callback()
The intention is to let the user know when a widget transform relative
to the surface changes. It works by calculating the surface relative
transform during allocation, and notifying the callbacks if it changed
since last time. Each widget adds itself as a listener to its parent
widget, thus will be triggered if a parents surface relative transform
changes.
2019-04-24 14:26:24 +02:00
Matthias Clasen
491829a2b5
builder-tool: Check canonical names
...
Always canonicalize names before comparing.
We were missing properties like left_attach,
since we were comparing them to left-attach.
2019-04-23 17:30:00 -04:00
Matthias Clasen
28be1c5d3a
builder-tool: Fix property check
...
Embarrassingly, there was a missing else
causing us to check all packing properties
as object properties, never finding them.
2019-04-23 21:25:59 +00:00
Timm Bäder
65ff19d149
eventcontrollermotion: Document missing signal parameters
2019-04-23 17:24:51 +02:00
Timm Bäder
3da6e83609
cssprovider: Fix a parameter name mismatch
2019-04-23 17:24:07 +02:00
Matthias Clasen
c91371951a
window: Remove dropped api from headers
...
This was forgotten in fed2db1493
.
2019-04-23 01:23:01 +00:00
Matthias Clasen
fed2db1493
window: Drop some x11-specific apis
...
The skip-taskbar, skip-pager and urgency hints were
only ever implemented for X11, and are not very useful
with modern desktops. Relegate the functionality to
x11 backend api, and drop the GtkWindow api.
2019-04-20 02:28:46 +00:00
Matthias Clasen
77ff83cdd1
Fix a compiler warning
2019-04-19 13:58:52 -04:00
Matthias Clasen
0e26e95b00
window: Fix an oversight
...
We must still reset cursors.
2019-04-18 20:15:39 +00:00
Matthias Clasen
ba1c5cf43f
Merge branch 'cursor-things' into 'master'
...
Cursor things
See merge request GNOME/gtk!764
2019-04-18 19:38:56 +00:00
Matthias Clasen
f3821031e0
window: Stop juggling cursors
...
We have convenience api for this.
2019-04-18 15:07:01 -04:00
Matthias Clasen
e37f4d0ea6
text: Stop juggling cursors
...
We have a convenience api for this.
2019-04-18 15:06:35 -04:00
Matthias Clasen
b26087845d
label: Stop juggling cursors
...
We have a convenience api for this.
2019-04-18 15:06:09 -04:00
Matthias Clasen
8727b0708e
css: Kerning affects text size
...
Thats the point. And we were missing the proper
flags to make GTK do the right thing when
changing font-kerning in the inspector.
2019-04-18 18:08:10 +00:00
Matthias Clasen
1932a50d36
css: Some updates to internal docs
...
Minor corrections to the AFFECTS flags docs.
2019-04-18 18:04:58 +00:00
Matthias Clasen
8400d8e75d
css: Letterspacing affects text size
...
It does. And we were missing the proper
flags to make GTK do the right thing when
changing letter-spacing in the inspector.
2019-04-18 17:34:44 +00:00
Benjamin Otte
83696639a7
themes: Regenerate CSS
...
Seems to have been forgotten a few times.
2019-04-18 02:28:15 +02:00
Benjamin Otte
1aa1610611
cssprovider: Export correct API
...
gtk_css_provider_get_named() is the old GTK3 style API to load themes.
Instead, export the function we currently use,
gtk_css_provider_load_named().
As a side effect we allow people to load a theme as often as they want
without conflicting with GTK's theme.
2019-04-18 02:26:04 +02:00
Matthias Clasen
0c87b62251
Survive absence of librsvg without criticals
...
We can't guarantee that we can load svgs, so
we shouldn't spew criticals when some of our
own resources fail to load due to that reason.
2019-04-18 00:14:00 +00:00
Matthias Clasen
69f12ed6a5
Avoid a crash without librsvg
...
gtk_css_image_recolor_load_texture may leave
recolor->text as NULL without setting error.
No need to crash for that.
2019-04-18 00:13:53 +00:00
Matthias Clasen
a8db330341
HighContrast: Fix a typo
...
The new css parser complains about an unknown pseudo-class
here.
2019-04-18 00:13:48 +00:00
Matthias Clasen
2681f7c7af
textview: Refine touch popup
...
The touch popup was meant to have linked buttons.
2019-04-17 23:40:32 +00:00
Matthias Clasen
836b5a217a
text: Refine the touch popup
...
The touch popup was meant to have linked buttons.
2019-04-17 23:40:26 +00:00
Matthias Clasen
802c426d89
Add a png version of process-working-symbolic
...
Otherwise, we get a spinning missing-image without
librsvg.
2019-04-17 22:27:19 +00:00
Benjamin Otte
4ce217b1a5
Merge branch 'wip/otte/warnings' into 'master'
...
Add more gcc error flags
See merge request GNOME/gtk!537
2019-04-17 16:51:06 +00:00
Matthias Clasen
33eb72a69b
dialog: Fix a doc typo
2019-04-16 21:13:40 -04:00
Matthias Clasen
21be06310c
builder-tool: Tweak --help output
2019-04-16 21:13:16 -04:00
Timm Bäder
1ee5c2cac4
grid: Fix annotation typo
2019-04-16 07:20:13 -04:00
Benjamin Otte
b9fb2f0933
Add missing G_GNUC_FALLTHROUGH statements
2019-04-15 14:40:25 +02:00
Benjamin Otte
0791924bf7
Convert fallthrough comments to G_GNUC_FALLTHROUGH
...
This way it's very obvious that fallthrough is indeed what we want.
Also bump the glib requirement to 2.59 which introduced
G_GNUC_FALLTHROUGH.
2019-04-15 14:40:25 +02:00
Benjamin Otte
90870194ff
filechoosernativewin32: Add missing break statement
2019-04-15 14:38:23 +02:00
Benjamin Otte
c593f86ac6
notebook: Add missing return statement
...
Previously, the code would just fall thrrough and repeat an operation it
had tried before, but that seems quite unnecessary.
2019-04-15 14:38:23 +02:00
Benjamin Otte
ad3ded7ba0
textview: Add missing break statement
2019-04-15 14:38:23 +02:00
Benjamin Otte
8ad38e5ae5
menu: Remove unused function parameter
...
The parameter was only ever set to TRUE.
And to make matters even more fun, the function didn't ever look
at the parameter.
2019-04-15 14:38:23 +02:00
Benjamin Otte
0cd2946676
menu: Move enum into only source file using it
2019-04-15 14:38:23 +02:00
Benjamin Otte
5473d13470
menu: remove bottom attach
...
bottom attach is top attach + 1, so use that everywhere
2019-04-15 14:38:23 +02:00
Benjamin Otte
31ccb7ca70
menu: get rid of 2 variables
...
They are always 0 and 1 respectively, so treat the code like that.
2019-04-15 14:38:23 +02:00
Benjamin Otte
dba1926a42
menu: Yeah cool, you're the last child
...
Nobody cares.
2019-04-15 14:38:23 +02:00
Benjamin Otte
b1b12a239f
menu: Remove attach properties
...
They're never changed from being -1. So just replace them with -1
everywhere.
2019-04-15 14:38:23 +02:00
Benjamin Otte
44ce36bef5
menubar: Remove pack direction
2019-04-15 14:38:23 +02:00
Emmanuele Bassi
daea92ea00
Ignore deprecated HarfBuzz API
...
HarfBuzz 2.0 deprecated some API used by the GtkFontChooser, but since
we're still supporting older versions of HarfBuzz, we should disable the
deprecation warnings to avoid too much noise during builds.
2019-04-13 14:30:09 +01:00
Benjamin Otte
f9d5869774
passwordentry: Add missing break statement
2019-04-13 11:01:02 +02:00
Timm Bäder
20ccb53c42
text: Remove useless gtk_widget_get_allocation call
2019-04-13 06:26:27 +02:00
Timm Bäder
f9a589c7fd
listbox: Fix compiler warning
2019-04-13 06:26:17 +02:00
Timm Bäder
ddd044f283
entry: Remove some unused constants
2019-04-13 06:18:43 +02:00
Benjamin Otte
9e8e3eb0ca
Merge branch 'listbox-separators' into 'master'
...
Listbox separators
See merge request GNOME/gtk!747
2019-04-13 00:38:14 +00:00
Matthias Clasen
87121998a2
Merge branch 'test-locale-change' into 'master'
...
testutils: Run in UTF8 locale
See merge request GNOME/gtk!734
2019-04-13 00:28:08 +00:00
Matthias Clasen
68d6c51dbc
inspector: Use the new show-separators property
...
Add separators to the list boxes on the Settings page.
2019-04-12 20:25:54 -04:00
Matthias Clasen
4551aef081
Adwaita: Implement list separators
...
Just put a top border on every row.
2019-04-12 20:25:16 -04:00
Matthias Clasen
0249bd4f8a
listbox: Add a ::show-separators property
...
This is getting translated into a .separators style
class on the list box css node.
2019-04-12 20:24:40 -04:00
Matthias Clasen
9a1da43890
inspector: Fix editing in the property list
...
The type-to-search was interfering with using
entries in the list. Avoid that by watching
where the focus is.
2019-04-12 19:48:23 -04:00
Benjamin Otte
c78ba42051
testutils: Run in UTF8 locale
...
before, code was using the "C" locale, but that one uses ASCII. Instead,
run in the "C.utf8" locale.
Nobody expects code to not support UTF8 and no end user runs their
machine in an ASCII setup, so it makes no sense to default to that.
2019-04-13 01:40:10 +02:00
Christoph Reiter
b66e4cd64c
gtkcomposetable: use g_size_checked_mul() for overflow checking
...
The check was added in !741 , this replaces it with g_size_checked_mul()
2019-04-12 22:41:58 +02:00
Matthias Clasen
e81f033ece
Merge branch 'validate-alloc-size' into 'master'
...
Check the size of the g_new arguments
See merge request GNOME/gtk!741
2019-04-12 19:11:30 +00:00
Matthias Clasen
a2db956492
inspector: Show readonly property values
2019-04-12 15:08:01 -04:00
Matthias Clasen
8d51038cb1
inspector: Cosmetics
2019-04-12 15:08:01 -04:00
Matthias Clasen
86c86e0860
inspector: Revamp attribute and action info
...
This also needs to be turned into single-line data.
2019-04-12 15:08:01 -04:00
Matthias Clasen
324f5472a2
Fix a crash
...
We had a signal handler with a wrong signature, causing
a crash when looking at the GtkSettings properties in
the inspector.
2019-04-12 15:08:01 -04:00
Emmanuele Bassi
1b6252ebf0
Merge branch 'default-request-mode' into 'master'
...
Add default GtkLayoutManagerClass.get_request_mode()
See merge request GNOME/gtk!738
2019-04-12 17:59:04 +00:00
Emmanuele Bassi
b4c8ba4de7
Check the size of the g_new arguments
...
We're passing integers without validating their size, and newer GCC are
very cross about it, with warnings like:
warning: argument 1 range [18446744071562067968, 18446744073709551615]
exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
We should check we're not overflowing the allocation size, by limiting
the range of values we can use.
First of all, we need to use `gsize` instead of a random `int`, since we're
allocating data.
Additionally, we need to check that the multiplication that computes the
size of the allocation doesn't overflow the maximum value of a `gsize`.
2019-04-12 18:58:34 +01:00
Benjamin Otte
f310609a66
builder: Parse GskTransform properties
...
In particular, this allows parsing the GtkFixed position properties.
2019-04-12 19:34:29 +02:00
Benjamin Otte
e1cd996617
selector: Inlcude : sign when reporting errors
2019-04-12 19:34:28 +02:00
Benjamin Otte
24cc721bc6
cssprovider: Mark whole @import statement on import error
2019-04-12 19:34:28 +02:00
Benjamin Otte
d41580adfc
calc: Have better error location range
2019-04-12 19:34:28 +02:00
Benjamin Otte
3ab65b7da2
csspositionvalue: Redo the parser
...
The old one incorrectly rejected "center left" and "center right".
2019-04-12 19:34:28 +02:00
Benjamin Otte
79238b0d8f
cssparser: Add error functions that take locations
...
... and use them to report better error locations for the warning when
blocks aren't terminated properly.
2019-04-12 19:34:28 +02:00
Benjamin Otte
2e0a56665a
css: Move gtkcsssection.[ch] into gtk/css
2019-04-12 19:34:28 +02:00
Benjamin Otte
76826cfa2f
cssparser: Pass in error locations explicitly
...
And for the quick function, use the start/end location of the current
token.
2019-04-12 19:34:28 +02:00
Benjamin Otte
37671d2bd0
cssprovider: Redo error emission
...
Emit all errors via the parser, don't try to have a custom error
handling machinery.
The only exception is the initial file load error - we need to do that
one directly, because there is no parser.
2019-04-12 19:34:28 +02:00
Benjamin Otte
04d24b7cd2
csssection: Make printing functions public
2019-04-12 19:34:28 +02:00
Benjamin Otte
085d34cbb0
cssprovider: Advance parser to start of declaration
...
This way, the block will reference the right location.
2019-04-12 19:34:28 +02:00
Benjamin Otte
46143492a2
cssprovider: Change section handling
...
Instead of building a full tree of sections that then nobody cares
about, just create sections as necessary for when we use it in the
inspector.
2019-04-12 19:34:28 +02:00
Benjamin Otte
a475d72d47
cssparser: Improve location APIs
...
1. Export multiple locations
2. Return the location instead of passing one in
2019-04-12 19:34:28 +02:00
Benjamin Otte
a8f712b09a
cssection: Return locations, not numbers
...
Now that we have GtkCssLocation, actually use it.
2019-04-12 19:34:28 +02:00
Benjamin Otte
2fb202187c
css: Remove GtkCssSectionType
...
It's unused.
2019-04-12 19:34:28 +02:00
Benjamin Otte
207c0b32b4
csssection: Redo constructors
...
Remove the unused one and rename the old one to new_from_parser().
2019-04-12 19:34:28 +02:00
Benjamin Otte
35f60dc918
csssection: Store a GtkCssLocation
2019-04-12 19:34:28 +02:00
Benjamin Otte
1cd9396154
css: Review error messages
...
... and move them from _gtk_css_parser_error() to the proper new error
message.
2019-04-12 19:34:28 +02:00
Benjamin Otte
de73ac980f
css: Use gtk_css_parser_consume_any() for transition shorthand
2019-04-12 19:34:28 +02:00
Benjamin Otte
a31e5f7a8c
cssshadow: Use gtk_css_parser_consume_any()
...
This way, the arguments can now really be speicified in any order.
A new testcase testing all the ordering possibilities has been added.
2019-04-12 19:34:28 +02:00
Benjamin Otte
e0a01ba174
css: Redo for new parser
...
This commit is still way too big, but I couldn't make it smaller.
It transitions the old CSS parser to the new parser. CSS parsing is now
tokenized, everything else is probably still buggy.
2019-04-12 19:34:28 +02:00
Benjamin Otte
f3db19d694
Resurrect the CSS parser from the tokenizer branch
...
So far that parser is unused.
2019-04-12 19:34:28 +02:00
Benjamin Otte
607502ef43
cssparser: Add gtk_css_parser_consume_url()
...
Another slight renaming and semantics change.
2019-04-12 19:34:28 +02:00
Benjamin Otte
acddc317da
cssparser: Add gtk_css_parser_resolve_url()
...
Another slight change of semantics and naming for the new parser.
2019-04-12 19:34:28 +02:00
Benjamin Otte
7f99c1e588
cssparser: Split integer gettig into has/consume functions
...
We can't try to get an integer because ultimately integer getters
support the same shenanigans that numbers and percentages do with calc()
and whatnot.
2019-04-12 19:34:28 +02:00
Benjamin Otte
5f3e5a0406
cssparser: Add gtk_css_parser_try_delim()
...
For parsing single code point delimiters. Also port calc() to use this.
2019-04-12 19:34:28 +02:00
Benjamin Otte
23080d47b5
cssparser: Get rid of _gtk_css_parser_try_double()
...
Use gtk_css_parser_consume_number() everywhere instead.
2019-04-12 19:34:28 +02:00
Benjamin Otte
f0d2f99239
cssparser: Add gtk_css_parser_consume_string()
...
Well, just rename _gtk_css_parser_read_string() for the new semantics,
but this sounds cooler.
2019-04-12 19:34:28 +02:00
Benjamin Otte
e7b9ecc99a
cssparser: Add gtk_css_parser_try_at_keyword()
2019-04-12 19:34:28 +02:00
Benjamin Otte
dce8c11b07
cssparser: Drop _gtk_css_parser_has_prefix()
...
Replace it with has_ident/has_function. The old function is a typical
string matching API, not a tokenizing one.
2019-04-12 19:34:28 +02:00
Benjamin Otte
7ccec19501
parser: Get rid of _gtk_css_parser_is_eof()
...
Use gtk_css_parser_has_token() instead.
2019-04-12 19:34:28 +02:00
Benjamin Otte
93b643c44d
css: Make font-weight an integer
...
This conforms to what Pango does and to the CSS4 spec. And it makes the
parsing code easier. So let's go for it.
2019-04-12 19:34:28 +02:00
Benjamin Otte
21616f6e2e
cssimagescaled: Use gtk_css_parser_consume_function()
...
As part of that, adapt the syntax from
-gtk-scaled( [<image>, <int>?]# )
to
-gtk-scaled( [<image> <int>?]# )
because the commas should be used to separate distinct elements.
Note that almost nobody specifies the scale anyway.
2019-04-12 19:34:28 +02:00
Benjamin Otte
8157004068
easevalue: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
8d69bda27a
cssimagelinear: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
dbdb81f411
cssparser: Add gtk_css_parser_consume_ident()
...
And use it to fix the palette parser.
2019-04-12 19:34:28 +02:00
Benjamin Otte
28fbcf6abe
shorthand: Use gtk_css_parser_try_ident()
2019-04-12 19:34:28 +02:00
Benjamin Otte
1fd339c46f
cssimageradial: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
b830bdca37
cssimagefallback: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
45bc4ed321
cssimagerecolor: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
9c862d7736
cross-fade: Make progress optional
...
Now we accept progress being unset and then dynamically compute it
on-demand.
2019-04-12 19:34:28 +02:00
Benjamin Otte
d99ae4b6c2
cross-fade: Use gtk_css_parser_consume_any()
...
.. and gtk_css_parser_consume_function().
gtk_css_parser_consume_any() is a new function that implements the CSS
spec's any combinator ||.
2019-04-12 19:34:28 +02:00
Benjamin Otte
96f9cbcabf
cssimage: Make cross-fade() an array
...
The new spec at https://drafts.csswg.org/css-images-4/#cross-fade-function
allows infinite images to cross-fade and we want to, too.
2019-04-12 19:34:28 +02:00
Benjamin Otte
3597f7e8b1
cssimageicontheme: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
38227dc972
cssfiltervalue: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
aa50e92c65
csstransformvalue: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
753ad64cbc
cssparser: Introduce gtk_css_parser_consume_function()
...
This is a vfunc-based function parser.
2019-04-12 19:34:28 +02:00
Benjamin Otte
3fb44ae651
cssparser: Add gtk_css_parser_try_token()
2019-04-12 19:34:28 +02:00
Benjamin Otte
76fb80f46c
cssparser: Introduce gtk_css_parser_try_ident()
...
... and gtk_css_parser_has_function().
2019-04-12 19:34:28 +02:00