| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
This is in preparation for calc(), as calc(50% - 5px) is valid CSS
but has 2 units. Instead, add a function to query a value's dimension
(so we can differentiate lengths from numbers) and add a function to
query if the value contains percentages.
|
| |
|
|
|
|
| |
Good luck, Lapo.
|
|
|
|
|
| |
And we schedule the resize conditionally only when text is rendered but
don't do that check for the redraw.
|
|
|
|
|
| |
Other properties will start depending on it in subsequent
commits, so move it up to prevent ordering problems.
|
|
|
|
|
|
|
|
| |
This property is defined in http://www.w3.org/TR/css3-ui/#caret-color.
We also add a -gtk-secondary-caret-color property, since GTK+ has
supported differently colored split cursors in the past. Unlike
CSS, we don't support the weakly defined auto keyword, and just
use currentColor as the initial value.
|
|
|
|
| |
I want to use it for a gadget, so it's better in the generic file.
|
| |
|
|
|
|
| |
The previous renaming commit was incomplete, so here we go again.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This borrows heavily from the CSS4 fonts draft's font-palette, currently
found at https://drafts.csswg.org/css-fonts-4/#font-palette-control
The palette is mainly meant to trigger invalidations when colors used for
symbolic icons change, to potentially allow extending supported colors
in symbolic icons and to recolor all colors of a symbolic icon, not just
the main one.
The syntax for the property goes like this:
Name: -gtk-icon-palette
Value: default | name <color> [ , name <color> ]*
Initial: default
Applies to: all elements with icons
Inherited: yes
Animatable: yes, each color animated separately
The property defines a list of named colors to be used when looking up
icons. If a name is not defined, the value of the current "color"
property is used. Which names are relevant depends on the icons in use.
Currently symbolic icons make use of the names "success", "warning" and
"error".
"default" is the current behavior of the GTK when coloring symbolic
icons and is equal to the string
success @success_color, warning @warning_color, error @error_color
Animation is crudely implemented by animating colors that are in both
palettes that are animated and otherwise keeping the color from the
palette that defined it. Note that this can cause a sharp cut at the
beginning or end of the animation when the color goes away and will
therefore be replaced with the color property.
You can see an example of animations at
http://gfycat.com/CautiousPeacefulIaerismetalmark
|
|
|
|
| |
This is a property for icons, so we should name it as such.
|
| |
|
|
|
|
| |
Nobody is able to look up those hex values.
|
|
|
|
|
| |
Get rid of unused values (POSITION_ENUM) and use different values for
NAME and ID.
|
|
|
|
|
|
|
|
|
|
|
| |
The recent change to the enum declaration for GtkCssChange actually
relied on compiler-dependent behavior, which also breaks the build on
some non-GCC compilers, such as Visual Studio. As noted in the
G_STATIC_ASSERT line just beneath this declaration, we need to change
this enum declaration to #define's, in order to fix the build in such
situations.
https://bugzilla.gnome.org/show_bug.cgi?id=752814
|
|
|
|
|
| |
Any time that these change, we shouldn't need to force a redraw on
the widget either.
|
|
|
|
|
|
| |
Properties like transition-property might change when hovering over
something, even if the property itself does not change. These properties
don't affect drawing, so don't queue redraws for them.
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the (1<<31) value evaluated to the 64bit value
0xFFFFFFFF80000000
instead of
0x0000000080000000
Avoid this by explicitly casting the value to unsigned long long.
Also cast all values to unsigned long long to achieve consistency
and hopefully in the future get new values added the same way.
|
|
|
|
|
| |
The support is limited to underline single, double and wavy, which
is what pango has today.
|
|
|
|
|
|
|
|
| |
Instead of GTK_CSS_CHANGE_POSITION we now have 4 values:
GTK_CSS_CHANGE_FIRST_CHILD, GTK_CSS_CHANGE_LAST_CHILD,
GTK_CSS_CHANGE_NTH_CHILD and GTK_CSS_CHANGE_NTH_LAST_CHILD
Nobody is using them directly yet.
|
| |
|
| |
|
|
|
|
|
| |
Support letter-spacing CSS property on GtkLabel.
Reftest is included.
|
|
|
|
|
|
|
| |
... and pass it to the API that computes new styles.
A special timestamp of 0 means "please don't animate" and is used when
no frame clock is available for a node.
|
| |
|
|
|
|
| |
They are not used anymore.
|
|
|
|
|
|
|
| |
The node declaration has the same functionality as
gtk_css_node_declaration_add_to_widget_path(). So instead of using that
function on a path, you can use the original path and the declaration in
a matcher.
|
|
|
|
|
|
| |
So far the vfunc is kinda quirky (the path argument is an out argument
for something you have to free when you're done with the matcher), but
I'm about to change that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This property is necessary to ensure widgets automatically update after
the text scale factor is changed desktop-wide.
And if I'm already doing a property like this, I can make it
overridable. So now you can override the dpi per-widget with CSS like
GtkSwitch {
-gtk-dpi: 48;
}
if you want to debug things.
Long-term, we want to get rid of this property and insist on dpi being
96 everywhere and people can change the font size to get larger fonts.
|
| |
|
|
|
|
|
|
|
|
|
| |
The property is useless to set (it only allows 'initial', 'inherit' and
'unset' as values), but it is used to track changes to the icon theme.
And as such, it can ensure that widgets can track when they need to
reload icons.
https://bugzilla.gnome.org/show_bug.cgi?id=743341
|
|
|
|
|
|
|
|
| |
The order in which properties are defined depends on the order in which
they are computed. And that means that properties can only depend on
other properties that are defined before them.
The next patches will need this reordering.
|
|
|
|
|
| |
This is literally just renaming of the object (and the associated source
files). No other changes are in there.
|
|
|
|
|
| |
In the case where the background is completely transparent, exit the
rendering functions before doing any expensive calculations.
|
|
|
|
|
|
| |
This adds the GtkCssAffects enum and implements it for all style
properties.
So far, this is not exposed outside of the implementation file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The font-stretch CSS property is defined in the Level 3 CSS Fonts
module, available at:
http://dev.w3.org/csswg/css-fonts/#propdef-font-stretch
It allows defining a normal, condensed, or expanded face to the font
description. Pango already supports it, so this is literally just the
CSS parser machinery needed to bridge our CSS to the FontDescription
API.
https://bugzilla.gnome.org/show_bug.cgi?id=735593
|
|
|
|
|
|
| |
This was introduced as a hackish way in 3.6 to make font updates
propagate properly. But since then, font handling has been changed and
this flag is no longer necessary.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The values can be:
"requested" - the style as requested
"regular" - use a regular full-color icon
"symbolic" - use a symbolic icon
The property defaults to "requested", so no changes should be seen
unless CSS overrides it.
It is also inherited, so that using this CSS
.toolbar { -gtk-icon-style: symbolic; }
is enough to force the whole toolbar to use symbolic icons.
|
|
|
|
|
| |
This property allows transforming icons and is mainly intended to be
used for spinner animations.
|
|
|
|
|
| |
This is to be used for rendering icon content via CSS, such as spinners
or checkboxes.
|
|
|
|
|
|
| |
Both a shorthand and individual properties. This is not officially part
of the CSS standard, but there's precedence for it at least in Mozilla:
https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius
|
|
|
|
|
|
|
| |
This will allow us to use the CSS machinery to apply a highlight or dim
effect when images are prelit or insensitive.
https://bugzilla.gnome.org/show_bug.cgi?id=705443
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=687842
|
|
|
|
|
|
| |
Rather than first collecting matches and then getting the change
for them we do the change collection directly on the tree. This
is about twice as fast.
|
|
|
|
|
| |
We switched around the order in gtkcssenumvalue.h, we need to switch
this order, too. Otherwise the parsing code will go bonkers.
|
|
|
|
|
|
|
|
| |
We now support the keywords (like xx-small, medium, larger, smaller...)
and I've changed the default value to be "medium".
This required some shuffling of the "get default font size" code. But
all is well now.
|
|
|
|
|
| |
This is used in gtk_widget_reset_style() (via GTK_CSS_CHANGE_ANY) now,
and that makes GtkSettings font related changes work again.
|
|
|
|
| |
This broke compilation in a7d213854460a7820d9665650a507081b9d196b7.
|
|
|
|
|
| |
We can juts pass a GtkStyleProviderPrivate, that one has the vfunc we
want already. So no need to pass vfuncs anymore.
|