Commit Graph

108 Commits

Author SHA1 Message Date
Carlos Garnacho
afeac82fbd GtkThemingEngine: Add gtk_theming_engine_lookup_color()
It could also be handy for theme engines...
2010-12-04 15:39:53 +01:00
Carlos Garnacho
9bdb7e6945 GtkThemingEngine: Remove unused variables 2010-12-04 15:39:53 +01:00
Carlos Garnacho
cf0bd12e6c GtkStyleProperties: Turn border-width into a GtkBorder property.
All current users of this CSS property have been updated to deal
with a GtkBorder.

Also a 0 border width has been set in the default CSS to ensure
GtkStyleContext and GtkThemingEngine always provide a non-NULL
pointer for this property.
2010-12-04 15:39:52 +01:00
Carlos Garnacho
64b7d9e5c1 GtkThemingEngine: Render gradients in tabs.
Background will be actually rotated in tabs, so the "bottom" side coincides
with the junction point, this makes gradients work as expected in rotated tabs.
2010-12-04 15:39:50 +01:00
Carlos Garnacho
32c2b13969 GtkThemingEngine: split background rendering to a private function. 2010-12-04 15:39:50 +01:00
Carlos Garnacho
3d956b10ee GtkStyleContext: handle prelight transitions 2010-12-04 15:39:44 +01:00
Carlos Garnacho
c90bee16ba GtkThemingEngine: Handle prelight transitions in render_layout() 2010-12-04 15:39:44 +01:00
Carlos Garnacho
e696c24f08 GtkThemingEngine: Also render topright and bottomleft corners if junction sides say so 2010-12-04 15:39:44 +01:00
Carlos Garnacho
4027dceaa9 Add #define for the "spinner" style class 2010-12-04 15:39:44 +01:00
Carlos Garnacho
cc18d65986 GtkThemingEngine: render square corner if the gap is too close on render_frame_gap() 2010-12-04 15:39:43 +01:00
Matthias Clasen
1391a61bc5 Improve frame-gap drawing
Instead of overdrawing the gap with bg-color, clip it away.
2010-12-04 15:39:42 +01:00
Matthias Clasen
54eadfcefd Fix another parameter mismatch 2010-12-04 15:39:42 +01:00
Carlos Garnacho
0fce9342ef GtkThemingEngine: Draw 3D-like effects on square frames with lines. 2010-12-04 15:39:40 +01:00
Carlos Garnacho
3138cc7677 GtkThemingEngine: Render rounded frames with light/shadow connections at 45° 2010-12-04 15:39:39 +01:00
Carlos Garnacho
95ae1a0aa6 GtkThemingEngine: don't overshoot when rendering frames. 2010-12-04 15:39:39 +01:00
Matthias Clasen
30fe448750 Fix handling of junctions in frame drawing code 2010-12-04 15:39:38 +01:00
Matthias Clasen
d9b0da5b83 Fix resize grip drawing
There was some confusion about junctions...
2010-12-04 15:39:34 +01:00
Matthias Clasen
21a193ad02 Make expanders prelight 2010-12-04 15:39:33 +01:00
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