| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Instead of constantly looking up the class we just stash it away in
class_init.
|
|
|
|
| |
This checks if a style_update affects the font.
|
|
|
|
|
| |
This gives fast access to the question of wether a style update requires
a resize.
|
|
|
|
|
| |
This property will be used to avoid gtk_widget_queue_resize() calls in
favor of gtk_widget_queue_draw().
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to store the border widths independant of them being set to 0 by
border styles, because otherwise we'd need to track that dependency and
recompute on changes, and I don't want to add more entries to
GtkCssDependencies just for this special case.
By moving the code that does the setting to 0 from the compute stage to
the query stage, we can achieve this.
Now we need to just be aware that the actual value stored is not set to
0 when we use gtk_css_computed_values_get_value().
|
|
|
|
|
|
|
| |
Both _gtk_css_style_property_print_value() and
_gtk_css_style_property_compute_value() aren't necessary anymore and are
replaced by _gtk_css_value_print() and _gtk_css_value_comptue()
respectively.
|
|
|
|
| |
... instead pof just reffing the value.
|
|
|
|
|
| |
from _gtk_style_property_parse_value(). The GtkCssParser takes care of
that now.
|
|
|
|
| |
from parse functions.
|
|
|
|
|
|
|
|
| |
Equality tests are done with _gtk_css_value_equal(). There is no need to
do it per-property, equal values will still be equal.
This essentially reverts 24f5d54329e028347bd76af42e86ed190c1229a2 and
92c7a7171e1240b6d961ee5b6f9ab6b596e98904.
|
| |
|
| |
|
|
|
|
| |
This will be needed soon.
|
|
|
|
|
| |
This removes the necessity to keep a GType associated with style
properties and code can now make use of GtkCssValue completely.
|
|
|
|
| |
... and assert every style property brings its own.
|
|
|
|
|
|
| |
The compute_value fallback path is only needed for custom properties,
the real style properties have custom compute functions if they need
them already.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For now, we return FALSE for all default css values, so this is not very
useful.
I also think of this as an optimization equal, not a guaranteed equal,
because we don't even have a notion of what "equal" means.
For example, for background-repeat, "repeat, repeat" and "repeat"
are functionally equivalent. But the cssvalue has no idea that it's used
for background-repeat.
As a more complicated example, "repeat, no-repeat" and "repeat" are
equal to what one sees as long as there's only one image listed
background-image-source. But once you start transition'ing to an image
with 2 sources, it's different...
|
|
|
|
| |
Also split out initial/inherit handling into a custom GtkCssValue class.
|
|
|
|
| |
That check is going to be refactored away.
|
|
|
|
|
| |
... and don't make it return a GtkCssValue. We want to use this for
compat with the old GValue APIs after all...
|
|
|
|
|
| |
Also, constify GtkCssValue getters, so we can pass a const GtkCssValue
to the print_func.
|
|
|
|
| |
and default to never compare them as equal.
|
|
|
|
|
|
| |
I really should not write code sometimes...
Copy/paste error this time.
|
|
|
|
|
| |
This fixes custom parse functions returning RGBA values where we
expected symbolic colors.
|
|
|
|
|
|
| |
Also, in places where we're computing a new CssValue based on an
old one, make sure that if nothing changes we're returning a reference
to the old one, rather than creating a new identical instance.
|
| |
|
|
|
|
| |
Also remove the now unused border parsing function for shorthands.
|
|
|
|
|
|
| |
... and use it.
It seems kinda necessary for the refactoring I'm about to do...
|
| |
|
|
|
|
| |
.. when parsing.
|
|
|
|
|
| |
Make the types explicit. This way, we can actually do useful stuff with
them (like sanity checks, d'oh).
|
|
|
|
|
| |
This way we can use different methods to query properties and aren't
bound to a GtkStyleProperties object.
|
|
|
|
|
| |
In particular, call it when querying properties by id. This is necessary
for make check to not die.
|
|
|
|
| |
Merge 1-line function into only caller
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of on-demand resolvage, we now resolve during lookup. The step
is done via
_gtk_css_style_property_compute_value()
which currently calls into
_gtk_css_style_compute_value()
That function has all the old resolving machinery.
The only part missing for now is the handling of win32 code. It will be
added back later.
|
|
|
|
|
| |
In particular, move the property_parse_func handling to
GtkCssCustomProperty exclusively.
|
|
|
|
| |
... and document that behavior.
|
|
|
|
| |
It's specific to GtKCssStyleProperty after all.
|
| |
|
|
|
|
| |
... and implement them in the 2 known subclasses.
|
|
|
|
|
|
| |
We can't print shorthands, so don't try.
In particular, I want to get away from shorthands being representable
using GValue, and this function kinda requires that.
|
|
|
|
|
| |
These variables are only relevant for style properties, but not for
shorthands, so put them there.
|
|
|
|
| |
... from GtkStyleProperty to GtkCssStyleProperty.
|
|
|
|
|
| |
only real style properties can have an id, so let
GtkCssStylePropertyClass handle it.
|
|
|