Re: Thoughts on GTK+ and CSS
- From: Robert Staudinger <robert staudinger gmail com>
- To: Tristan Van Berkom <tvb gnome org>
- Cc: gtk-devel-list gnome org
- Subject: Re: Thoughts on GTK+ and CSS
- Date: Fri, 31 Jul 2009 10:15:18 +0200
On Thu, Jul 30, 2009 at 7:06 PM, Tristan Van Berkom<tvb gnome org> wrote:
[...]
> An example of the backwardness we have in place, is that,
> IMO its simply wrong to assume the role of a GtkToolbar in a
> given application, the toolbar already needs properties to override
> theme settings in cases where its not in context. Another example
> would be that you simply cant write a custom toolbar implementation
> and inherit the theme of a toolbar unless you actually subclass the
> GtkToolbar.
This is a good point. The most natural mapping to CSS would probably
be using a set of CSS classes [1] defined by gtk.
> Then GTK+ could have a list of stock styles:
>
> #define GTK_STOCK_STYLE_MAIN_TOOLBAR "gtk-stock-style-main-toolbar"
Agreed (whatever the actual name). The theming would then go like
GtkToolbar { ... } /* Common theming for all toolbars */
GtkToolbar.gtk-stock-style-main-toolbar { ... } /* Additional theming
for "main" toolbar. */
> #define GTK_STOCK_STYLE_SMALL_BORDER "gtk-stock-style-small-border"
> #define GTK_STOCK_STYLE_LARGE_BORDER "gtk-stock-style-large-border"
Not sure what those would be for.
> #define GTK_STOCK_STYLE_FIRST_ITEM "gtk-stock-style-first-item"
> #define GTK_STOCK_STYLE_LAST_ITEM "gtk-stock-style-last-item"
Might not be needed since CSS defines positional pseudo classes
already [2]. We should be able to get the child position from the
GtkContainer, also see the related messages in this thread.
[...]
[1] http://www.w3.org/TR/CSS21/selector.html#class-html
[2] http://www.w3.org/TR/CSS21/selector.html#pseudo-class-selectors
- Rob
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]