Carlos Garnacho
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
Carlos Garnacho
74de1839a4
GtkStyleSet: Set an empty default_value if none is provided.
2010-12-04 15:38:11 +01:00
Carlos Garnacho
c908e263ac
GtkCssProvider: strip whitespaces in symbolic color values.
2010-12-04 15:38:11 +01:00
Carlos Garnacho
f12d7409cc
Allow linefeeds in property values.
2010-12-04 15:38:11 +01:00
Carlos Garnacho
621a95f515
GtkSettings: implement GtkStyleProvider
2010-12-04 15:38:11 +01:00
Carlos Garnacho
58a51bca97
GtkStyle: Fill in x/ythickness and font_desc from the style context.
2010-12-04 15:38:11 +01:00
Carlos Garnacho
643abe3127
GtkStyleSet: Register "margin" property.
2010-12-04 15:38:10 +01:00
Carlos Garnacho
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
Carlos Garnacho
846f67d805
GtkStyle: Allow GTK_ARROW_NONE.
2010-12-04 15:38:10 +01:00
Carlos Garnacho
7e7347d1a0
GtkNotebook: invert tab drawing order so region flags are set correctly.
2010-12-04 15:38:10 +01:00
Carlos Garnacho
78a98decae
Get rid of GdkPangoRenderer code in GtkThemingEngine.
2010-12-04 15:38:10 +01:00
Carlos Garnacho
f058359182
Replace GdkRegion and GdkRectangle with their cairo counterparts.
2010-12-04 15:38:09 +01:00
Carlos Garnacho
c9d626523d
Remove gtkalias from style context code.
2010-12-04 15:38:09 +01:00
Carlos Garnacho
9dfba95f09
GtkCssProvider: Add gtk_css_provider_load_from_path()
2010-12-04 15:38:09 +01:00
Carlos Garnacho
0ce649e965
Plug a bunch of leaks.
2010-12-04 15:38:09 +01:00
Carlos Garnacho
91904f6778
GtkButton: Notify on active state when (un)depressed
2010-12-04 15:38:09 +01:00
Carlos Garnacho
9b949479b3
GtkThemingEngine: Animate checkboxes activation.
2010-12-04 15:38:09 +01:00
Carlos Garnacho
7519ed278b
GtkThemingEngine: Add progress arg to gtk_theming_engine_is_state_set()
2010-12-04 15:38:09 +01:00
Carlos Garnacho
3c07e3d3df
GtkWidget: Update GtkStyleContext animation regions on allocation change.
2010-12-04 15:38:08 +01:00
Carlos Garnacho
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
Carlos Garnacho
bbd0c5a2a2
GtkStyleContext: Declare gtk_style_context_list_classes() in header.
2010-12-04 15:37:38 +01:00
Carlos Garnacho
52baa7d51e
GtkCssProvider: Parse properties of type GtkAnimationDescription.
2010-12-04 15:37:38 +01:00
Carlos Garnacho
114f30b772
GtkStyleSet: Register the "transition" property.
2010-12-04 15:37:38 +01:00
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
2c7c4d9a51
GtkStyleContext: Return insertion position if not found when matching classes/regions
2010-12-04 15:37:37 +01:00
Carlos Garnacho
11ac0cb3e1
GtkStyle: set the active flag depending on shadow_type in draw_box().
2010-12-04 15:37:37 +01:00
Carlos Garnacho
bccec3ef0c
GtkCssProvider: Use class for tooltips.
2010-12-04 15:37:36 +01:00
Carlos Garnacho
74697d91fe
GtkCssProvider: Parse and match class info.
2010-12-04 15:37:36 +01:00
Carlos Garnacho
27c91622f6
Set classes info in GtkWidgetPath.
2010-12-04 15:37:36 +01:00
Carlos Garnacho
2dabf20cfd
GtkStyleContext: Add gtk_style_context_list_classes().
2010-12-04 15:37:36 +01:00
Carlos Garnacho
8a1b6e8224
GtkWidgetPath: Add methods to include class info in paths.
2010-12-04 15:37:36 +01:00
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
d9e3782391
GtkStyleSet: Fix compiler warning.
2010-12-04 15:37:35 +01:00
Carlos Garnacho
355f0d69ab
GtkStyleSet: Allow custom parsers on registered properties.
2010-12-04 15:37:35 +01:00
Carlos Garnacho
99224c9eec
GtkCssProvider: Parse correctly widget types with a name.
...
There's now a distinction between:
GtkLabel#label-name: Label with name "label-name"
GtkWindow #label-name: Window containing a widget named "label-name"
2010-12-04 15:37:34 +01:00
Carlos Garnacho
56e4ffabea
Compare widget names as GQuarks in style matching.
2010-12-04 15:37:34 +01:00
Carlos Garnacho
09d8592b5b
GtkWidgetPath: Make API more consistent.
2010-12-04 15:37:34 +01:00
Carlos Garnacho
ad08330fae
Compare region names as quarks in style matching.
2010-12-04 15:37:34 +01:00
Carlos Garnacho
d47d3d0200
GtkCssProvider: Set child combinators in default CSS.
2010-12-04 15:37:34 +01:00
Carlos Garnacho
5f77ead9c6
GtkCssProvider: Parse and compare widget names.
2010-12-04 15:37:33 +01:00
Carlos Garnacho
52878c45b5
GtkCssProvider: Don't jump too eagerly to the next element when comparing selectors.
2010-12-04 15:37:33 +01:00
Carlos Garnacho
85dbc71921
GtkCssProvider: Immediately bail out if GType couldn't be resolved.
2010-12-04 15:37:33 +01:00
Carlos Garnacho
9ebbc7b5c5
GtkCssProvider: Small optimization.
2010-12-04 15:37:33 +01:00
Sven Herzberg
c001833ed1
GtkCssProvider: don't ignore custom attributes
...
* gtk/gtkcssprovider.c: don't ignore custom attribites (which can be
added by theme engines)
2010-12-04 15:37:33 +01:00
Sven Herzberg
27bc581dca
GtkWidgetPath: properly use const
...
* gtk/gtkwidgetpath.c,
* gtk/gtkwidgetpath.h: use const where possible
2010-12-04 15:37:32 +01:00
Carlos Garnacho
b6226cb7b9
GtkThemingEngine: Render correctly spinbutton buttons.
2010-12-04 15:37:32 +01:00
Carlos Garnacho
dd8da82d1e
GtkStyle: set junction details in spinbutton buttons.
2010-12-04 15:37:32 +01:00
Carlos Garnacho
8c117b1638
GtkThemingEngine: Add gtk_theming_engine_get_junction_sides().
2010-12-04 15:37:31 +01:00
Carlos Garnacho
9108739c9b
GtkStyleContext: Add gtk_style_context_[gs]et_junction_sides().
...
These functions will help widgets specify how does one element being painted
relate to other contiguous elements.
2010-12-04 15:37:31 +01:00
Carlos Garnacho
d9b42ce50f
Add GtkJunctionSides flags.
2010-12-04 15:37:30 +01:00
Carlos Garnacho
143c4b3b60
GtkStyleContext: Add gtk_style_context_lookup_color().
...
gtk_style_lookup_color() now uses this function internally.
2010-12-04 15:37:30 +01:00
Carlos Garnacho
b4a24d6457
GtkStyleSet: Register the "border" property.
2010-12-04 15:37:29 +01:00
Carlos Garnacho
78cc97f7b3
GtkThemingEngine: fix typo in function declaration.
2010-12-04 15:37:28 +01:00
Carlos Garnacho
fcf12ff9b9
GtkThemingEngine: Add gtk_theming_engine_get_direction().
2010-12-04 15:37:28 +01:00
Carlos Garnacho
978d97ea6f
GtkWidget: Set style context direction.
2010-12-04 15:37:27 +01:00
Carlos Garnacho
dc216ffb00
GtkStyleContext: Add gtk_style_context_[gs]et_direction().
2010-12-04 15:37:27 +01:00
Carlos Garnacho
e15dc89f89
GtkWidget: Add the default CSS provider to all style contexts.
2010-12-04 15:37:27 +01:00
Carlos Garnacho
85398fc05f
GtkCssProvider: Add gtk_css_provider_get_default().
...
This method returns a GtkCssProvider with the default style information
loaded.
2010-12-04 15:37:26 +01:00
Carlos Garnacho
bd6751230a
GtkStyle: Move gtk_render_* calls to default vmethod implementations.
2010-12-04 15:37:26 +01:00
Carlos Garnacho
9255e20bf8
GtkWidget: Create GtkStyle on top of GtkStyleContext.
2010-12-04 15:37:26 +01:00
Carlos Garnacho
6c549fecd3
GtkWidget: Construct style for partial widget hierarchies.
...
Some unparented widgets like to ask style details, so now the style is
constructed regardless of the parent being present or not, and then
reconstructed if the parent changes.
2010-12-04 15:37:25 +01:00
Carlos Garnacho
09d6c4ea52
GtkStyle: Optionally construct above a GtkStyleContext.
2010-12-04 15:37:25 +01:00
Carlos Garnacho
1e83e52b3d
GtkThemingEngine: Add code to render GtkFrame frame with gap.
2010-12-04 15:37:24 +01:00
Carlos Garnacho
d858801ec3
GtkThemingEngine: Obey active/selected when rendering text.
2010-12-04 15:37:24 +01:00
Carlos Garnacho
5510f24cc1
GtkThemingEngine: Rip out focus rendering from old code.
2010-12-04 15:37:24 +01:00
Carlos Garnacho
eadaded374
GtkThemingEngine: Rip out expander rendering from old code.
2010-12-04 15:37:24 +01:00
Carlos Garnacho
d22f393be3
GtkThemingEngine: Render frames and spinbutton boxes properly.
2010-12-04 15:37:24 +01:00
Carlos Garnacho
7482b636e6
GtkThemingEngine: Improve background rendering.
...
Now active and selected states are taken into account, and GtkSpinButton
buttons are special cased.
2010-12-04 15:37:23 +01:00
Carlos Garnacho
911431c0b2
GtkThemingEngine: Improve pixel alignment in arrows.
2010-12-04 15:37:23 +01:00
Carlos Garnacho
c18ee462e3
GtkThemingEngine: Add methods to retrieve widget style properties.
2010-12-04 15:37:23 +01:00
Carlos Garnacho
0dc81b9a35
GtkStyleSet: Allow setting default value when registering properties.
...
This is now used for the "engine" keyword, where the default engine is used
if none is specified.
2010-12-04 15:37:23 +01:00
Carlos Garnacho
c712480912
GtkStyleContext: Add varargs functions for getting widget style properties.
2010-12-04 15:37:23 +01:00
Carlos Garnacho
5f2e8bc0d1
GtkStyleContext: Ensure style rebuilds after adding/removing classes.
2010-12-04 15:37:23 +01:00
Carlos Garnacho
7748b1d2de
GtkStyleContext: ensure class lookup return the correct insertion position if not found.
2010-12-04 15:37:22 +01:00
Carlos Garnacho
0813a2283e
GtkCssProvider: Allow '_' in the middle of symbolic color names.
2010-12-04 15:37:22 +01:00
Carlos Garnacho
227c500dce
GtkThemingEngine: Improve slider rendering.
2010-12-04 15:37:22 +01:00
Carlos Garnacho
44373ec551
GtkThemingEngine: Cairo-ify frame rendering from GtkStyle.
2010-12-04 15:37:22 +01:00
Carlos Garnacho
8771f46dae
GtkThemingEngine: Cairo-ify frame_gap rendering from GtkStyle.
2010-12-04 15:37:22 +01:00
Carlos Garnacho
7d2b51f147
GtkThemingEngine: Cairo-ify extension rendering from GtkStyle.
2010-12-04 15:37:21 +01:00
Carlos Garnacho
4772b67563
GtkThemingEngine: Make render_background use drawing primitives.
2010-12-04 15:37:21 +01:00
Carlos Garnacho
1b556aa4d1
GtkThemingEngine: Unify code to render lines.
2010-12-04 15:37:21 +01:00
Carlos Garnacho
75b059a3f2
GtkThemingEngine: Add cairo-ified rendering primitives.
...
Functions to add paths for lines, rectangle sides, and the gap side in notebooks
have been added.
2010-12-04 15:37:20 +01:00
Carlos Garnacho
5cdb3f0e90
GtkThemingEngine: Cairo-ify handle rendering from GtkStyle.
2010-12-04 15:37:20 +01:00
Carlos Garnacho
9261c2a9d7
GtkThemingEngine: Take option rendering from GtkStyle.
2010-12-04 15:37:20 +01:00
Carlos Garnacho
4e45e9099e
GtkThemingEngine: Take checkbox rendering from GtkStyle.
2010-12-04 15:37:19 +01:00
Carlos Garnacho
27f5257d49
GtkStyleContext: Don crash on empty class sets.
2010-12-04 15:37:19 +01:00
Carlos Garnacho
038bcdcdb6
GtkThemingEngine: Use GdkPangoRenderer when painting layouts.
2010-12-04 15:37:19 +01:00
Carlos Garnacho
475f0fc266
GtkStyleContext: Add gtk_style_context_save/restore().
...
This API will be used to have savepoints when adding and removing
style classes information.
2010-12-04 15:37:18 +01:00
Carlos Garnacho
4a465d279d
GtkThemingEngine: Add gtk_theming_engine_get_screen().
2010-12-04 15:37:18 +01:00
Carlos Garnacho
5db7197c27
GtkWidget: Set screen info in GtkStyleContext.
2010-12-04 15:37:18 +01:00
Carlos Garnacho
758c3e18cc
GtkStyleContext: Add gtk_style_context_[gs]et_screen()
2010-12-04 15:37:17 +01:00
Carlos Garnacho
41650933fd
GtkStyleContext: Add priv pointer to object struct.
2010-12-04 15:37:17 +01:00
Carlos Garnacho
10f6c04f33
GtkStyleSet: Add priv pointer to object struct.
2010-12-04 15:37:17 +01:00
Carlos Garnacho
875237187c
GtkCssProvider: Add priv pointer to object struct.
2010-12-04 15:37:17 +01:00
Carlos Garnacho
51a8f642da
Fix include.
2010-12-04 15:37:16 +01:00
Carlos Garnacho
a256171d34
GtkStyleContext: Add gtk_style_context_lookup_icon_set().
2010-12-04 15:37:16 +01:00