gtk-css-engine r32 - bzr-playground
- From: robsta svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk-css-engine r32 - bzr-playground
- Date: Mon, 18 Aug 2008 13:51:13 +0000 (UTC)
Author: robsta
Date: Mon Aug 18 13:51:13 2008
New Revision: 32
URL: http://svn.gnome.org/viewvc/gtk-css-engine?rev=32&view=rev
Log:
Update docs.
Modified:
bzr-playground/ (props changed)
bzr-playground/README
Modified: bzr-playground/README
==============================================================================
--- bzr-playground/README (original)
+++ bzr-playground/README Mon Aug 18 13:51:13 2008
@@ -1,5 +1,5 @@
-CSS Theme Engine for GTK+
+CSS THEME ENGINE FOR GTK+
=========================
Putting stuff together for a gtk theme engine that would be configured using CSS rather than gtkrc syntax.
@@ -12,201 +12,221 @@
http://bzr-playground.gnome.org/~andreasn/gtk-css-engine/
bzr+ssh://bzr-playground.gnome.org/bzr/andreasn/gtk-css-engine
-Primitives
-----------
+
+(0) CSS Subset
+==============
+
+* Descendant selectors, e.g. "GtkComboBox GtkButton { ... }"
+
+* Child selectors, e.g. "GtkBox > GtkButton { ... }"
+
+* Class selectors, e.g. "hline.handlebox { ... }"
+ The class-part is mapped to gtk'd detail string.
+
+* ID selectors, e.g. "GtkButton#foo { ... }"
+ The ID-part is mapped to the widget's name.
+
+* Universal selector, e.g. "* { ... }"
+
+* Sequences of selectors, e.g. "GtkNotebook, GtkFrame { ... }"
+
+
+(0.1) Supported CSS Properties
+------------------------------
+
+The following properties are at least partially supported.
+
+background
+background-color
+background-image
+border
+border-bottom
+border-left
+border-right
+border-top
+color
+
+
+(1) Primitives
+==============
Attributes are canonicalised, i.e. s/_/-/g.
Comments are enclosed in ().
Optionality is expressed through [].
pseudo class "normal" will be default.
-* hline
- Pseudo classes: normal | active | prelight | selected | insensitive
- Selectors:
- - Arbitrary widget properties that can be represented as a string.
- - detail: NULL | handlebox | hseparator | menuitem | tearoffmenuitem | toolbar
-
-* vline
- Pseudo classes: normal | active | prelight | selected | insensitive
- Selectors:
- - Arbitrary widget properties that can be represented as a string.
- - detail: NULL | handlebox | toolbar | vseparator
-
-* shadow
- Pseudo classes: normal | active | prelight | selected | insensitive
- Selectors:
- - Arbitrary widget properties that can be represented as a string.
- - shadow: none | in | out | etched-in | etched-out
- - detail: NULL | calendar | combobox | dnd | entry | frame | handle |
- scrolled-window | text | viewport
-
* arrow
- Pseudo classes: normal | active | prelight | selected | insensitive
- Selectors:
- - Arbitrary widget properties that can be represented as a string.
- - shadow: none | in | out | etched-in | etched-out
- - arrow: up | down | left | right | none
- - detail: NULL | arrow | calendar | menu-scroll-arrow-up | menu-scroll-arrow-down |
+ Classes: arrow | calendar | menu-scroll-arrow-up | menu-scroll-arrow-down |
menuitem | notebook | spinbutton | tearoffmenuitem |
hscrollbar | vscrollbar
-
-* diamond
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- shadow: none | in | out | etched-in | etched-out
- - No predefined detail strings for `diamond'.
-
-* DEPRECATED: string
+ - arrow: up | down | left | right | none
* box
+ Classes: buttondefault | button | bar (cellrendererprogress) |
+ handlebox-bin | hruler | hseparator (in `wide-separators' mode) |
+ menubar | menu | menu-scroll-arrow-up | menu-scroll-arrow-down |
+ menuitem | hseparator | notebook | optionmenu |
+ bar (progress-bar) | trough (progress-bar | range) | hscrollbar |
+ vscrollbar | trough-upper | trough-lower | trough-fill-level-full |
+ trough-fill-level | spinbutton | spinbutton-up | spinbutton-down |
+ toolbar | vseparator | vruler | base (window)
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- shadow: none | in | out | etched-in | etched-out
- - detail: NULL | buttondefault | button | bar (cellrendererprogress) |
- handlebox-bin | hruler | hseparator (in `wide-separators' mode) |
- menubar | menu | menu-scroll-arrow-up | menu-scroll-arrow-down |
- menuitem | hseparator | notebook | optionmenu |
- bar (progress-bar) | trough (progress-bar | range) | hscrollbar |
- vscrollbar | trough-upper | trough-lower | trough-fill-level-full |
- trough-fill-level | spinbutton | spinbutton-up | spinbutton-down |
- toolbar | vseparator | vruler | base (window)
-
-* flat-box
+** boxgap, mapped onto "box".
+ Classes: notebook
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- shadow: none | in | out | etched-in | etched-out
- - detail: NULL | checkbutton | curve-bg | entry-bg | eventbox | expander | tooltip |
- listitem | trough (progress) | checkbutton | text | treeitem |
- viewportbin | base (window) |
- cell-odd[-start | -end | -middle] |
- cell-even[-start | -end | -middle] |
- cell-odd-ruled-sorted[-start | -end | -middle] |
- cell-even-ruled-sorted[-start | -end | -middle] |
- cell-odd-ruled[-start | -end | -middle] |
- cell-even-ruled[-start | -end | -middle] |
- cell-odd-sorted[-start | -end | -middle] |
- cell-even-sorted[-start | -end | -middle]
+ - position: left | right | top | bottom
* check
+ Classes: cellcheck | checkbutton | check (menuitem)
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- shadow: none | in | out | etched-in | etched-out
- - detail: NULL | cellcheck | checkbutton | check (menuitem)
-* option
+* diamond
+ No predefined classes for this primitive.
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- shadow: none | in | out | etched-in | etched-out
- - detail: NULL | cellradio | option (menuitem) | radiobutton
-* tab
+* expander
+ Classes: expander | treeview
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- - shadow: none | in | out | etched-in | etched-out
- - detail: NULL | optionmenutab
+ - style: collapsed | semi-collapsed | semi-expanded | expanded
* extension
+ Classes: tab (notebook)
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- shadow: none | in | out | etched-in | etched-out
- position: left | right | top | bottom
- - detail: NULL | tab (notebook)
-* focus
+* flatbox
+ Classes: checkbutton | curve-bg | entry-bg | eventbox | expander | tooltip |
+ listitem | trough (progress) | checkbutton | text | treeitem |
+ viewportbin | base (window) |
+ cell-odd[-start | -end | -middle] |
+ cell-even[-start | -end | -middle] |
+ cell-odd-ruled-sorted[-start | -end | -middle] |
+ cell-even-ruled-sorted[-start | -end | -middle] |
+ cell-odd-ruled[-start | -end | -middle] |
+ cell-even-ruled[-start | -end | -middle] |
+ cell-odd-sorted[-start | -end | -middle] |
+ cell-even-sorted[-start | -end | -middle]
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- - detail: NULL | button | calendar-day | checkbutton | entry | expander |
- colorwheel-light | colorwheel-dark | iconview-drop-indicator |
- icon-view | add-mode (listitem) | tab | button (gtkoptionmenu) |
- trough (gtkrange) | text | textview | tray-icon | treeitem |
- treeview-drop-indicator[-left | -right | -middle] |
- treeview[-left | -right | -middle]
+ - shadow: none | in | out | etched-in | etched-out
-* slider
+* focus
+ Classes: button | calendar-day | checkbutton | entry | expander |
+ colorwheel-light | colorwheel-dark | iconview-drop-indicator |
+ icon-view | add-mode (listitem) | tab | button (gtkoptionmenu) |
+ trough (gtkrange) | text | textview | tray-icon | treeitem |
+ treeview-drop-indicator[-left | -right | -middle] |
+ treeview[-left | -right | -middle]
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- - shadow: none | in | out | etched-in | etched-out
- - detail: NULL | hscale | vscale
* handle
+ Classes: handlebox | paned
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- shadow: none | in | out | etched-in | etched-out
- orientation: horizontal | vertical
- - detail: NULL | handlebox | paned
-* expander
+* hline
+ Classes: handlebox | hseparator | menuitem | tearoffmenuitem | toolbar
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- - style: collapsed | semi-collapsed | semi-expanded | expanded
- - detail: NULL | expander | treeview
-* layout
- Styling of text will not be considered for now.
+* option
+ Classes: cellradio | option (menuitem) | radiobutton
+ Pseudo classes: normal | active | prelight | selected | insensitive
+ Selectors:
+ - Arbitrary widget properties that can be represented as a string.
+ - shadow: none | in | out | etched-in | etched-out
-* resize-grip
+* resizegrip
+ Classes: statusbar
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- edge: north-west | north | north-east | west | east | south-west | south | south-east
- - detail: NULL | statusbar
-* shadow-gap
+* shadow
+ Classes: calendar | combobox | dnd | entry | frame | handle |
+ scrolled-window | text | viewport
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- shadow: none | in | out | etched-in | etched-out
- - position: left | right | top | bottom
- - detail: NULL | frame
-* box-gap
+** shadowgap, mapped onto "shadow".
+ Classes: frame
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- shadow: none | in | out | etched-in | etched-out
- position: left | right | top | bottom
- - detail: NULL | notebook
-* polygon
+* slider
+ Classes: hscale | vscale
Pseudo classes: normal | active | prelight | selected | insensitive
Selectors:
- Arbitrary widget properties that can be represented as a string.
- shadow: none | in | out | etched-in | etched-out
-Widgets
--------
-
-Support for widgets will probably be implemented by aliases on primitives, e.g. GtkButton might be matched to "box[class=GtkButton]" internally.
+* tab
+ Classes: optionmenutab
+ Pseudo classes: normal | active | prelight | selected | insensitive
+ Selectors:
+ - Arbitrary widget properties that can be represented as a string.
+ - shadow: none | in | out | etched-in | etched-out
-The widget's name property is special cased and used as ID, thus it can be matched by '#foo { ... }'.
+* vline
+ Classes: handlebox | toolbar | vseparator
+ Pseudo classes: normal | active | prelight | selected | insensitive
+ Selectors:
+ - Arbitrary widget properties that can be represented as a string.
-Composite Widgets
------------------
+(1.1) Unsupported primitives
+----------------------------
-Composite widgets will probably be supported through selectors, e.g. "GtkComboBoxEntry > GtkEntry" (child selector) or "GtkComboBoxEntry GtkEntry" (descendant selector).
+* polygon
+ Pseudo classes: normal | active | prelight | selected | insensitive
+ Selectors:
+ - Arbitrary widget properties that can be represented as a string.
+ - shadow: none | in | out | etched-in | etched-out
+* layout
+ Styling of text will not be considered for now.
-Brainstorming
--------------
+* string: deprecated in Gtk+ proper.
-* Should the detail string act as a counterpart to what `class' is in html? Then one could write "hline.toolbar { color: black; }".
-* Multiple classes per element, a la <a class="foo bar baz">. Does this buy anything? Could possibly be matched on the widget name.
+(3) Brainstorming
+=================
-* Application matching, possibly something like "application#gimp { ... }", match on g_get_prgname(). This could probably also be done with a custom `@' rule, e.g. "@application gimp { stylesheet goes here }"
+* Multiple classes per element, can this be emulated somehow?
* CSS Variables ( http://disruptive-innovations.com/zoo/cssvariables/ ). Named colours could be implemented as built-in variables.
-* Easy to use when faking the gtk style (firefox, openoffice). We can provide custom hierarchy matching through a proxy in ccd.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]