Commit Graph

413 Commits

Author SHA1 Message Date
Carlos Garnacho
67c4f8d02e GtkCssProvider: Compare GtkWidgetPath regions with css. 2010-12-04 15:37:08 +01:00
Carlos Garnacho
977a972358 GtkCssProvider: fix parsing of consecutive pseudo-classes.
Now either of foo{}, foo:first-child{}, foo:nth-child(even):insensitive or
foo:active{} will be correctly parsed.
2010-12-04 15:37:08 +01:00
Carlos Garnacho
0be4659c5d GtkCssProvider: move to next selector element on match or child combinator. 2010-12-04 15:37:08 +01:00
Carlos Garnacho
bc0af3208d GtkCssProvider: free selector path on parse_rule(). 2010-12-04 15:37:08 +01:00
Carlos Garnacho
07171d5f68 GtkCssProvider: Add named regions to selector path. 2010-12-04 15:37:08 +01:00
Carlos Garnacho
707d5ae99c GtkCssProvider: Parse named regions. 2010-12-04 15:37:07 +01:00
Carlos Garnacho
71949e05c4 Refurbish GtkWidgetPath API.
The foreach() function is now gone, there's now API to get
GTypes and names from the position in the path.
2010-12-04 15:37:07 +01:00
Carlos Garnacho
8c03503d16 GtkCssProvider: Add support for child/descendant combinators.
Now, selectors like:

  GtkWindow > GtkButton {}
  GtkNotebook > GtkLabel {}

will represent a direct parent/child relation between both elements, while

  GtkWindow GtkButton {}
  GtkNotebook GtkLabel {}

will allow intermediate children between these.
2010-12-04 15:37:06 +01:00
Carlos Garnacho
d691e79cbf GtkCssProvider: Fix typo freeing SelectorElements. 2010-12-04 15:37:05 +01:00
Carlos Garnacho
abbeb89b7c GtkCssProvider: Allow empty selector.
universal selector is implied, so things like this work:

:active {}
:insensitive{}
2010-12-04 15:37:05 +01:00
Carlos Garnacho
4c8353bcbf GtkCssProvider: Allow '*' selectors.
These would match a single widget of any type.
2010-12-04 15:37:04 +01:00
Carlos Garnacho
468f216b1c GtkCssProvider: Add state parsing.
Now state is now defined as a pseudoclass in the CSS format, selectors like:

GtkWidget:active { }
GtkButton:insensitive { }
GtkCalendar:prelight { } (also :hover is accepted)
...

define the style for the given state.
2010-12-04 15:37:03 +01:00
Carlos Garnacho
bccad0c65c Added GtkCssProvider.
GtkCssProvider is a GtkStyleProvider implementation which is able to read
CSS-like input to style widgets.

At the moment, only the basic parser features are available.
2010-12-04 15:37:02 +01:00