Commit Graph

24925 Commits

Author SHA1 Message Date
1e66155aec GtkStyleContext: invalidate context when setting the screen 2010-12-04 15:38:14 +01:00
8dfa0e03ea GtkWidget: Set style context's screen before the widget_path.
This is so the style context has all necessary information before
triggering a style change on setting the path.
2010-12-04 15:38:14 +01:00
49ac732a18 GtkStyleContext: Add gtk_style_context_[add|remove]_provider_for_screen()
These functions allow per-screen style providers. also, the changed signal
will be emitted whenever a style context changes.
2010-12-04 15:38:14 +01:00
f239704094 GtkWidget: Add gtk_widget_reset_style().
This function is analogous to gtk_widget_reset_rc_styles(),
updates style recursively on a widget.
2010-12-04 15:38:13 +01:00
3c390c9c8e GtkWidget: Add the style-updated signal
This signal is emitted whenever the widget's style changes.
2010-12-04 15:38:13 +01:00
77ccdfc94e GtkStyle: Protect against padding being NULL 2010-12-04 15:38:13 +01:00
9f84e101bf GtkStyleContext: Add gtk_style_context_invalidate().
This function will regenerate all styling information.
2010-12-04 15:38:12 +01:00
756bbf526f GtkStyleSet: Fix typo 2010-12-04 15:38:12 +01:00
58b6e538c9 GtkThemingEngine: use background-image in render_background() 2010-12-04 15:38:12 +01:00
2794e8d6dd GtkStyleSet: Register a "background-image" property.
Ironically, it currently just handles gradients, the name is to conform
to current CSS gradient implementation trends.
2010-12-04 15:38:12 +01:00
cf87923d1b GtkStyleSet: Handle GtkGradients as a replacement for cairo_pattern_t
The former will handle GtkSymbolicColors, which will be resolved and
cached at query time.
2010-12-04 15:38:12 +01:00
3fc5c87bcb GtkCssProvider: Add a parser for gradients. 2010-12-04 15:38:12 +01:00
142a72637d Add GtkGradient.
This type defines a gradient between 2 symbolic colors, with any number
of color stop between these. At the moment it has been put besides
GtkSymbolicColor, although should be completely private, it will likely
need extending in the future for radial gradients.

At some point, it maybe should also be used for images, so painting
both a gradient and an image is consistent.
2010-12-04 15:38:11 +01:00
74de1839a4 GtkStyleSet: Set an empty default_value if none is provided. 2010-12-04 15:38:11 +01:00
c908e263ac GtkCssProvider: strip whitespaces in symbolic color values. 2010-12-04 15:38:11 +01:00
f12d7409cc Allow linefeeds in property values. 2010-12-04 15:38:11 +01:00
02a30118c6 Add a boxed type for cairo_pattern_t. 2010-12-04 15:38:11 +01:00
621a95f515 GtkSettings: implement GtkStyleProvider 2010-12-04 15:38:11 +01:00
58a51bca97 GtkStyle: Fill in x/ythickness and font_desc from the style context. 2010-12-04 15:38:11 +01:00
643abe3127 GtkStyleSet: Register "margin" property. 2010-12-04 15:38:10 +01:00
585afafa39 Add basic parser for GtkBorder properties.
Different units aren't supported, it takes 1 to 4 integers representing
pixel distances.
2010-12-04 15:38:10 +01:00
846f67d805 GtkStyle: Allow GTK_ARROW_NONE. 2010-12-04 15:38:10 +01:00
7e7347d1a0 GtkNotebook: invert tab drawing order so region flags are set correctly. 2010-12-04 15:38:10 +01:00
78a98decae Get rid of GdkPangoRenderer code in GtkThemingEngine. 2010-12-04 15:38:10 +01:00
f058359182 Replace GdkRegion and GdkRectangle with their cairo counterparts. 2010-12-04 15:38:09 +01:00
c9d626523d Remove gtkalias from style context code. 2010-12-04 15:38:09 +01:00
9dfba95f09 GtkCssProvider: Add gtk_css_provider_load_from_path() 2010-12-04 15:38:09 +01:00
0ce649e965 Plug a bunch of leaks. 2010-12-04 15:38:09 +01:00
91904f6778 GtkButton: Notify on active state when (un)depressed 2010-12-04 15:38:09 +01:00
9b949479b3 GtkThemingEngine: Animate checkboxes activation. 2010-12-04 15:38:09 +01:00
7519ed278b GtkThemingEngine: Add progress arg to gtk_theming_engine_is_state_set() 2010-12-04 15:38:09 +01:00
3c07e3d3df GtkWidget: Update GtkStyleContext animation regions on allocation change. 2010-12-04 15:38:08 +01:00
61a0544b8b GtkStyleContext: Add animation machinery.
Animation regions are confined through gtk_style_context_[push|pop]_animatable_region,
anything that's painted between these calls will be invalidated if an animation starts
for any of the regions in the stack.

gtk_style_context_notify_state_change() may be called from widgets to indicate a
change for a given GtkStateType, in that case an animation will be started if there
is an animation description for the widget/state.
2010-12-04 15:37:38 +01:00
bbd0c5a2a2 GtkStyleContext: Declare gtk_style_context_list_classes() in header. 2010-12-04 15:37:38 +01:00
52baa7d51e GtkCssProvider: Parse properties of type GtkAnimationDescription. 2010-12-04 15:37:38 +01:00
114f30b772 GtkStyleSet: Register the "transition" property. 2010-12-04 15:37:38 +01:00
ed840e73e4 Add GtkAnimationDescription as a private boxed object.
This struct will be used to represent an animation in GtkStyleSet. It
will only be used internally in GtkStyleContext in order to trigger
animations, engines shouldn't need this.
2010-12-04 15:37:37 +01:00
2e2c07b695 Add GtkTimeline as a private object.
This will only be used internally by GtkStyleContext in order
to animate state changes. When a proper animation framework is
introduced in GTK+, it may be ditched.
2010-12-04 15:37:37 +01:00
4781f94de2 Move all theming stack to use GtkStateFlags.
This support goes from the theming engines, which are able to retrieve
style for different combined states to the CSS provider, where several
state pseudo-classes may be specified, such as:

GtkButton:active:prelight {}
2010-12-04 15:37:37 +01:00
2c7c4d9a51 GtkStyleContext: Return insertion position if not found when matching classes/regions 2010-12-04 15:37:37 +01:00
11ac0cb3e1 GtkStyle: set the active flag depending on shadow_type in draw_box(). 2010-12-04 15:37:37 +01:00
bccec3ef0c GtkCssProvider: Use class for tooltips. 2010-12-04 15:37:36 +01:00
74697d91fe GtkCssProvider: Parse and match class info. 2010-12-04 15:37:36 +01:00
27c91622f6 Set classes info in GtkWidgetPath. 2010-12-04 15:37:36 +01:00
2dabf20cfd GtkStyleContext: Add gtk_style_context_list_classes(). 2010-12-04 15:37:36 +01:00
8a1b6e8224 GtkWidgetPath: Add methods to include class info in paths. 2010-12-04 15:37:36 +01:00
a3637ec60d s/child class/region/ everywhere.
"Child class" is an invented term anyway, and it conceptually defines
identifiable regions in widgets.
2010-12-04 15:37:35 +01:00
198d75bea5 GtkStyleContext: Rename internal struct.
GtkStyleRegion has been renamed to GtkStyleInfo, as it doesn't really
have much to do with regions itself, the information it contains does.
This struct is used in save/restore.
2010-12-04 15:37:35 +01:00
e04dfd4d6d GtkThemingEngine: Add gtk_theming_engine_register_property().
This function may be used for custom property registration from
theming engines. The property names will have the
-${engine-type-name}-${prop-name} format, the parser has been
modified to allow properties with '-' as the first char.
2010-12-04 15:37:35 +01:00
d9e3782391 GtkStyleSet: Fix compiler warning. 2010-12-04 15:37:35 +01:00