Commit Graph

90 Commits

Author SHA1 Message Date
Carlos Garnacho
ead23cd0ce GtkThemingEngine: Make render_option() depend on border-style and border-color. 2010-12-04 15:39:20 +01:00
Carlos Garnacho
04783534ed GtkThemingEngine: Make render_check() depend on border-style and border-color. 2010-12-04 15:39:19 +01:00
Carlos Garnacho
1bfb169ce6 GtkThemingEngine: Documents that engines must only use this API.
It was a bit unclear in the documentation, even if it was from the
API POV.
2010-12-04 15:39:18 +01:00
Matthias Clasen
b6776dc116 Fix the resize handle drawing 2010-12-04 15:39:15 +01:00
Matthias Clasen
f0eafe60f8 Remove debug output 2010-12-04 15:39:14 +01:00
Matthias Clasen
9ca66efe2c Fix a memory leak 2010-12-04 15:39:14 +01:00
Carlos Garnacho
25b6945971 GtkThemingEngine: remove unused code 2010-12-04 15:39:13 +01:00
Carlos Garnacho
892fe46324 Fix compile warnings 2010-12-04 15:39:13 +01:00
Carlos Garnacho
6099399fa7 GtkThemingEngine: Use border settings on render_extension/frame_gap() 2010-12-04 15:39:11 +01:00
Carlos Garnacho
534942d994 GtkThemingEngine: Do not use possible reserved word. 2010-12-04 15:39:10 +01:00
Carlos Garnacho
62ee0956e3 GtkStyleProperties: Use GParamSpec for properties registration. 2010-12-04 15:39:06 +01:00
Carlos Garnacho
0431239ead GtkThemingEngine: ensure 1px wide frames aren't painted between pixels. 2010-12-04 15:38:48 +01:00
Carlos Garnacho
f66275fa6a GtkThemingEngine: Use square cap for solid frames. 2010-12-04 15:38:47 +01:00
Carlos Garnacho
3d1403e684 GtkThemingEngine: ensure that background isn't rendered past the frame boundaries. 2010-12-04 15:38:47 +01:00
Carlos Garnacho
d6ba3b7d89 GtkThemingEngine: Get rid of obsolete code for tooltips. 2010-12-04 15:38:47 +01:00
Carlos Garnacho
271145645c GtkThemingEngine: Use GtkSymbolicColor for shades. 2010-12-04 15:38:41 +01:00
Carlos Garnacho
df95a74a27 GtkThemingEngine: Do not require a default value when registering properties
NULL should work for 0 for int/double/enum/... types and NULL for
pointer types, this should be sane enough to not require a default
value.
2010-12-04 15:38:40 +01:00
Carlos Garnacho
a23863211b GtkStyleContext: Add gtk_render_icon_pixbuf()
This function is similar to gtk_style_render_icon(), which is now
implemented on top of this one.
2010-12-04 15:38:38 +01:00
Carlos Garnacho
06c8857191 GtkThemingEngine: Fix compile warning. 2010-12-04 15:38:38 +01:00
Carlos Garnacho
ebf5bd390f Add gtk_render_activity()
This method will render progress bars and spinners, these should
handle active and inconsistent states' animation progress in order
to perform animations.
2010-12-04 15:38:33 +01:00
Carlos Garnacho
af1f8701dc GtkThemingEngine: draw resize grip through render_handle().
GtkJunctionSides is used instead of GdkWindowEdge, GtkStyle
implementation has changed to use GtkStyleContext's.
2010-12-04 15:38:33 +01:00
Carlos Garnacho
4acc20abc1 s/GtkStyleSet/GtkStyleProperties/
The former name had oddities such as gtk_style_set_set() and such,
so the new name is nicer in that regard and not much longer.
2010-12-04 15:38:29 +01:00
Carlos Garnacho
8ea649e0a0 Rely only on fg/bg colors.
"foreground-color" has been renamed to just "color" as in regular CSS,
and the "text-color" and "base-color" properties have been removed. The
default CSS has been changed to have widgets cope with this change.
2010-12-04 15:38:29 +01:00
Carlos Garnacho
a8a1d8cd01 GtkThemingEngine: Use ::name when registering style props. 2010-12-04 15:38:29 +01:00
Carlos Garnacho
90de318ab3 GtkThemingEngine: Add ::name construct only property
This property is to be set by theming engines, the name set will be favored
over the object type name when registering custom properties, making possible
something like:

-Clearlooks-border: blah;
2010-12-04 15:38:28 +01:00
Carlos Garnacho
6356f01b06 GtkThemingEngine: render 0-radius frames with 3D-like 45° corner effect 2010-12-04 15:38:27 +01:00
Carlos Garnacho
43f7fb8354 GtkThemingEngine: Clear the background for .background class 2010-12-04 15:38:27 +01:00
Carlos Garnacho
975f133d63 GtkThemingEngine: Improve rendering of inset/outset borders. 2010-12-04 15:38:26 +01:00
Carlos Garnacho
490d59f045 Do not shade alpha values. 2010-12-04 15:38:25 +01:00
Carlos Garnacho
4e02218f52 Use GdkRGBA all around in GtkStyleContext. 2010-12-04 15:38:25 +01:00
Carlos Garnacho
3a455ed8f9 GtkStyleSet: Register the border-style and border-color properties
This is also implemented in the theming engine, although the default
CSS should be using it in order to theme buttons, troughs, sliders
and such.
2010-12-04 15:38:25 +01:00
Carlos Garnacho
161d5175e1 GtkThemingEngine: Honor border-radius in render_background(). 2010-12-04 15:38:24 +01:00
Matthias Clasen
35a41bd801 Make loading of theming engines from modules work 2010-12-04 15:38:23 +01:00
Carlos Garnacho
68bfb94f69 Change semantics of the methods to check whether an animation is running.
It actually messed up with the state being actually set, and having a
transition animation running for it. Now this dichotomy is removed, and
gtk_style_context_state_is_running() only checks whether an animation is
running, leaving state checking to flags & GTK_STATE_FLAG_*.
2010-12-04 15:38:22 +01:00
Carlos Garnacho
a79626b7fb Add theming docs
Both API and file format is documented, there's still missing
a migration doc though.
2010-12-04 15:38:21 +01:00
Carlos Garnacho
59b0fa8133 Remove GtkOrientation parameter from gtk_render_handle().
The case for paned can be guessed out from the height and width,
for handlebox the orientation parameter doesn't make much sense,
and this way it could also be used for resize grips.
2010-12-04 15:38:21 +01:00
Carlos Garnacho
88a3c2daae GtkGradient: Handle symbolic gradients.
The css parser has been modified to parse correctly radial gradients:

background-image: -gtk-gradient (radial,
                                 center center, 0,
                                 center center, 0.8,
                                 from (#000), to (#fff));

The theming engine has been modified to correctly animate these,
as well as transitions between different pattern types.
2010-12-04 15:38:20 +01:00
Carlos Garnacho
a1a90396b7 GtkThemingEngine: Do not return a const GtkThemingEngine on load() 2010-12-04 15:38:18 +01:00
Carlos Garnacho
908babd8ae GtkThemingEngine: Implement animations between gradients/colors. 2010-12-04 15:38:17 +01:00
Carlos Garnacho
96e5a02148 GtkThemingEngine: Use border-image to render borders if an image is available. 2010-12-04 15:38:16 +01:00
Carlos Garnacho
58b6e538c9 GtkThemingEngine: use background-image in render_background() 2010-12-04 15:38:12 +01:00
Carlos Garnacho
78a98decae Get rid of GdkPangoRenderer code in GtkThemingEngine. 2010-12-04 15:38:10 +01:00
Carlos Garnacho
c9d626523d Remove gtkalias from style context code. 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
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
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
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
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
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