| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Replace leftover gtk-doc syntax (#Type) with backquotes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This property needs to be treated as flags, not as
enum, since it should be possible to specify more
than one value, e.g.
text-decoration-line: underline overline;
Tests included.
Fixes: #3621
|
|
|
|
|
| |
We can support text-decoration-line: overline,
since pango supports it now.
|
|
|
|
|
|
|
| |
Implement most of transform-origin. We only
handle the xy components currently, which lets
us reuse the position value implementation that
is used for background-position.
|
| |
|
|
|
|
| |
We hit these code paths a lot
|
|
|
|
|
| |
We want to always use the current icon theme, and only
have the minimum amount of custom properties.
|
|
|
|
|
|
| |
Don't allocate a new GString if we never need it and therefore don't
create the PangoAttrList if we have no attributes anyway. Update callers
to handle the possible NULL return value.
|
|
|
|
|
|
|
|
| |
These are always set to the same value as the corresponding border
radius properties. They are also non-standard, so remove them and
replace them with the border radius properties everywhere.
Fixes #2414
|
| |
|
|
|
|
|
|
|
| |
Fix up the index computation. We have duplicate entries
in the type enum, so to go from one of the 'initial' types
to it corresponding type you subtract one, but to find
the size array entry for a type, you divide by 2.
|
|
|
|
|
| |
Reuse the type field in GtkCssValues to make initial
style values easily recognizable.
|
| |
|
|
|
|
|
|
|
| |
Replace uses of gtk_css_style_get_value with direct access,
throughout the tree. We don't replace all uses, just those
where we are dealing with a fixed property. Be careful to
handle the currentColor special case for color properties.
|
|
|
|
|
|
|
|
| |
Introduce refcounted structs for groups of related css properties,
and use them to store the style values. Both GtkCssStaticStyle and
GtkCssAnimatedStyle fill in the structs in GtkCssStyle, and we
can avoid vfuncs for value access, which should be much faster.
We can even start accessing style->core->color directly.
|
|
|
|
|
| |
Doesn't make sense to set all the css values on the font description in
there except for the font variations, so do these here as well.
|
|
|
|
|
| |
Instead of going through the slow GValue code path. This function was
unused, so use it in GtkWidget's update_pango_context() now.
|
|
|
|
|
|
|
|
| |
The differenciation between a literal color value and an RGBA value
caused problems in various situations. Just treat the two the same but
don't allow access to the rgba value of a non-literal color value.
This gets rid of around 1.6k rgba values in the widget-factory.
|
|
|
|
| |
Move the implementation to where it belongs.
|
|
|
|
| |
It is clearer if this function returns a GtkCssStaticStyle.
|
|
|
|
|
| |
This lets us avoid poking directly at the GtkCssAnimatedStyle
struct in gtkcssnode.c.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This is a missing part of the CSS font level 3 module.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes that work using 1 of 2 options:
1. Add all missing enums to the switch statement
or
2. Cast the switch argument to a uint to avoid having to do that (mostly
for GdkEventType).
I even found a bug while doing that: clearing a GtkImage with a surface
did not notify thae surface property.
The reason for enabling this flag even though it is tedious at times is
that it is very useful when adding values to an enum, because it makes
GTK immediately warn about all the switch statements where this enum is
relevant.
And I expect changes to enums to be frequent during the GTK4 development
cycle.
|
|
|
|
|
|
|
|
| |
As Benjamin says, ident should only be used if any value
is valid, which is not the case here. So use enums instead,
which should also be more efficient. To handle the more
complicated cases like font-variant-ligatures, we have to
introduce flags-like values.
|
|
|
|
|
| |
The property is called font-variant-alternates, not -alternatives.
Correct this everywhere.
|
|
|
|
| |
This is translated to the corresponding OpenType features.
|
|
|
|
|
|
| |
This is only a partial implementation, since we don't support
@font-feature-values. The only supported value is historical-forms,
for now.
|
|
|
|
| |
This gets translated to the corresponding OpenType features.
|
|
|
|
| |
This gets translated to the corresponding OpenType features.
|
|
|
|
| |
This gets translated to the corresponding OpenType features.
|
|
|
|
| |
This gets translated into corresponding OpenType features.
|
|
|
|
| |
This gets translated to the OpenType feature kern.
|
|
|
|
|
|
| |
This gets called a lot during snapshotting, and this change
alone brings down snapshot time by almost 10% in a syntethic
snapshot test.
|
|
|
|
|
|
|
|
| |
Similar in spirit to
gtk_style_context_get (ctx, state, "font", ...)
but avoids the need for a style context.
This will be used to for css-styled text rendering
from css subnodes.
|
|
|
|
|
|
|
| |
This is _gtk_style_context_get_pango_attributes, decoupled
from the GtkStyleContext. This will be used to drive css-styled
text rendering from css subnodes of widgets, e.g. for the value
in GtkScale.
|
| |
|
|
|
|
|
| |
Add a newline after CSS properties, so things don't run into
each other.
|
|
|
|
|
|
|
|
|
|
|
| |
Drop the custom style printing implementation in gtkcssnode.c and
instead reuse the existing gtk_css_style_print function, extending
it a bit to suit our needs.
Instead of computing values, just recognize initial values by
having no CSS section. Also do away with the show-initial flag, and
just always filter out initial values. The flag can come back when
it is needed.
|
|
|
|
|
| |
This avoids allocating a temporary bitmask, and lets us
avoid some value comparisons altogether.
|
|
|
|
|
|
|
| |
Gets rid of the need to do
if (ANIMATED_STYLE() &&
animated_style_is_static(ANIMATED_STYLE(style))
|
|
|
|
| |
There is no difference between a style and itself.
|
|
|
|
|
| |
compute_dependencies() is only used internally by GtkCssStaticStyle,
so there's no need to have it elsewhere.
|
|
|
|
|
|
|
|
| |
GtkCssStyle is the base class to be used for all types of styles that do
exist.
GtkCssAnimatedStyle is the only implementation so far, that is exactly a
copy/paste of the old GtkCssStyle code.
|
|
This is literally just renaming of the object (and the associated source
files). No other changes are in there.
|