Add support for colored borders

Use BigRectangle to draw the border and background if there's
a border width or border radius and no border image. (Only
uniform borders are supported for now with some deviations
from the CSS model noted in the comments.)

The background color and image parameters are removed from
StWidget's draw_background() method since they were not used
for StButton (the only current user) and the encapsulation
break that they presented caused some minor problems.

Add a test case for borders, and also use borders to style
the buttons in the 'inline-style' test case.

https://bugzilla.gnome.org/show_bug.cgi?id=595993
This commit is contained in:
Owen W. Taylor
2009-09-20 16:21:47 -04:00
parent 076e902b2c
commit 2a0adc0fc8
7 changed files with 175 additions and 25 deletions

View File

@@ -72,10 +72,8 @@ struct _StWidgetClass
ClutterActorClass parent_class;
/* vfuncs */
void (* draw_background) (StWidget *self,
ClutterActor *background,
const ClutterColor *color);
void (* style_changed) (StWidget *self);
void (* draw_background) (StWidget *self);
void (* style_changed) (StWidget *self);
};
GType st_widget_get_type (void) G_GNUC_CONST;