Commit Graph

12 Commits

Author SHA1 Message Date
Timm Bäder
4b4b77ca04 cssanimatedstyle: Save animation in array 2019-09-09 17:36:23 +02:00
Benjamin Otte
83fb7a649f css: Merge GtkStyleProviderPrivate into GtkStyleProvider
This is just lots of renaming.

The interface remains private, so the public API does not change, apart
from removing the definition of the Interface object to avoid
subclassing.
2017-10-31 04:33:54 +01:00
Benjamin Otte
759d8dafd9 cssstyle: Add gtk_css_style_is_static()
Gets rid of the need to do

  if (ANIMATED_STYLE() &&
      animated_style_is_static(ANIMATED_STYLE(style))
2015-03-18 15:23:33 +01:00
Benjamin Otte
1116914ea0 css: Move scale to GtkStyleProviderPrivate
This way, we can remove it as a separate argument from
gtk_css_value_compute() and allow computation to only depend on one
thing: the style provider.
2015-02-06 11:26:31 +01:00
Benjamin Otte
b7be202089 stylecontext: Refactor update_properties()
It now always returns a new instance.
2015-01-07 14:26:47 +01:00
Benjamin Otte
a3bf910585 cssanimatedstyle: Make advancing the style return a new style
This is another step towards making CssStyles immutable.
2015-01-07 14:26:47 +01:00
Benjamin Otte
682abc345f cssanimatedstyle: Remove unused function 2015-01-07 14:26:47 +01:00
Benjamin Otte
980923c761 cssanimatedstyle: Merge two functions 2015-01-07 14:26:47 +01:00
Benjamin Otte
79f7392109 stylecontext: Make static styles static
Instead of keeping an animated style everywhere, we replace it with the
static style when nothing gets animated.

Apart from making the code cleaner, this gets rid of a bunch of animated
style values that do nothing but wrap a static style.
2015-01-07 14:26:47 +01:00
Benjamin Otte
270e73bfcc stylecontext: Always pass the static style
... to build_properties.
There is always one available, so we can insist on that one.

This simplifies a bunch of code.
2015-01-07 14:26:47 +01:00
Benjamin Otte
ac215ffc8f cssstyle: Add GtkCssStaticStyle
For now, this is only an implementation detail of the animated style.

The idea is to use GtkCssStaticStyle as the result of CSS queries and
then put a GtkCssAnimatedStyle on top that manages the animations. The
neat thing about this is that you can cache the static values.
2015-01-07 14:26:47 +01:00
Benjamin Otte
4168e0385e cssstyle: Split into GtkCssStyle and GtkCssAnimatedStyle
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.
2015-01-07 14:26:46 +01:00