[ubuntu-art] How should an Ubuntu button widget look like?
Robert Staudinger
robert.staudinger at gmail.com
Sat Nov 29 11:17:06 GMT 2008
On Sat, Nov 29, 2008 at 11:05 AM, Thorsten Wilms <t_w_ at freenet.de> wrote:
> On Sat, 2008-11-29 at 10:55 +0100, Robert Staudinger wrote:
[...]
>> The concept of `focus auras' is very well supported in Gtk+, look at
>> [1] for more info.
>>
>> [1] http://live.gnome.org/GnomeArt/Tutorials/GtkThemes/GtkButton
>
> Oh, that's good :)
>
> However, the css-engine will need to support that, then.
> The SVG template doesn't take this possibility into account at all
> (yet) ;)
Right, and I'm not sure how to best do that. The problem is that gtk
draws the focus indicator in a separate operation.
Something like this may work though, assume "rect(t, r, b, l)" gives
the position of the button image without `aura':
/* Draw the button itself, from the image that includes the `aura'. */
GtkButton[has-default=true][has-focus=true] {
border-image: url(theme.svg#button-default-focused) 8 9 6 9;
-moz-image-region: rect(t, r, b, l);
}
/* Draw the `aura' (aka focus indicator). */
GtkButton[has-default=true][has-focus=true] > gtk-focus-indicator {
border-image: url(theme.svg#button-default-focused) 8 9 6 9;
clip: rect(t, r, b, l);
}
Need to try and find out how it works out. Also `-moz-image-region'
[1] and `clip' are not yet supported in libccss.
[1] https://developer.mozilla.org/en/CSS/-moz-image-region
- Rob
More information about the ubuntu-art
mailing list