Carlos Garnacho
43cff6f6f7
GtkCssProvider: theme notebooks.
2010-12-04 15:39:11 +01:00
Carlos Garnacho
d4aade109f
Fix gtk_css_provider_get_named() docs.
2010-12-04 15:39:09 +01:00
Carlos Garnacho
8243c3c025
GtkCssProvider: Fix typo in gtk_css_provider_get_named()
...
provider was being redefined in the inner block, so the loaded
provider didn't get to be returned.
2010-12-04 15:39:08 +01:00
Carlos Garnacho
a185954d7c
Hardcode 3.0 version for style files and paths.
...
It's about time to start using the right paths.
2010-12-04 15:39:07 +01:00
Carlos Garnacho
9ffaf1122d
GtkCssProvider: Accept '%' in value strings.
2010-12-04 15:39:06 +01:00
Carlos Garnacho
62ee0956e3
GtkStyleProperties: Use GParamSpec for properties registration.
2010-12-04 15:39:06 +01:00
Carlos Garnacho
1c847d9c21
GtkCssProvider: Docs fix for -gtk-gradient() syntax.
2010-12-04 15:39:06 +01:00
Carlos Garnacho
bcf81a0e23
Handle looping transition animations.
2010-12-04 15:39:05 +01:00
Carlos Garnacho
1123159dc9
GtkCssProvider: Handle better wrong enum/flag values.
2010-12-04 15:39:05 +01:00
Carlos Garnacho
9bb96e271d
GtkCssProviders: Parse GTypeFlags based values.
2010-12-04 15:39:05 +01:00
Carlos Garnacho
5cb6fed0bd
GtkCssProvider: Add initial unit parsing logic
...
At the moment only "px" are supported, and such is the default
value when no unit is specified.
2010-12-04 15:39:05 +01:00
Carlos Garnacho
65abcb722e
GtkCssProvider: Handle the "none" keyword to unset properties.
2010-12-04 15:39:05 +01:00
Carlos Garnacho
8b9b9c22e7
GtkCssProvider: Also parse GdkColor values
...
This is necessary for widget style properties to work.
2010-12-04 15:39:04 +01:00
Carlos Garnacho
815e3499ae
GtkCssProvider: Add lighter/darker color functions.
...
These behave the same than in GtkStyle.
2010-12-04 15:39:04 +01:00
Carlos Garnacho
cb2f9a86e5
GtkCssProvider: allow color names from rgb.txt when parsing colors.
2010-12-04 15:39:03 +01:00
Carlos Garnacho
1487b34679
Remove GTK_STATE_LAST.
...
It didn't turn out to be that useful, nor widely used.
2010-12-04 15:38:56 +01:00
Carlos Garnacho
1fb6cc8d77
Use the correct cairo-gobject.h include path.
2010-12-04 15:38:56 +01:00
Carlos Garnacho
3848a58b17
GtkCssProvider: theme progressbars in default CSS.
2010-12-04 15:38:48 +01:00
Carlos Garnacho
8b267a58da
GtkCssProvider: Do not miss the last class name in concatenated classes.
...
Selectors like .menu.check or .entry.progressbar were being misparsed
and attributed to .menu and .entry.
2010-12-04 15:38:45 +01:00
Carlos Garnacho
912ad78cc5
Remove GTK_REGION_DEFAULT
...
GTK_STYLE_CLASS_DEFAULT is preferred to match a default area, as
it doesn't make sense to have a per-region default.
2010-12-04 15:38:41 +01:00
Carlos Garnacho
4acc20abc1
s/GtkStyleSet/GtkStyleProperties/
...
The former name had oddities such as gtk_style_set_set() and such,
so the new name is nicer in that regard and not much longer.
2010-12-04 15:38:29 +01:00
Carlos Garnacho
8ea649e0a0
Rely only on fg/bg colors.
...
"foreground-color" has been renamed to just "color" as in regular CSS,
and the "text-color" and "base-color" properties have been removed. The
default CSS has been changed to have widgets cope with this change.
2010-12-04 15:38:29 +01:00
Carlos Garnacho
7de2cf3286
GtkCssProvider: Fix parsing of concatenated classes.
...
Now selectors such as:
GtkWidget#name.class1.class2
#name.class1.class2
.class1.class2
are parsed correctly, being meaningful for a widget defining several
classes.
2010-12-04 15:38:29 +01:00
Carlos Garnacho
51b742044a
GtkCssProvider: Parse alpha() symbolic colors.
...
The "alpha" symbolic color modifies a passed color's alpha by a factor,
the syntax would accept things like:
background-color: alpha (@bg_color, 0.8);
foreground-color: alpha (shade (@fg_color, 0.8), 0.5);
2010-12-04 15:38:28 +01:00
Carlos Garnacho
0bd81ef710
GtkCssProvider: Make default style depend more on custom colors.
2010-12-04 15:38:28 +01:00
Carlos Garnacho
087249db07
GtkCssProvider: Update end string when misparsing symbolic colors.
2010-12-04 15:38:26 +01:00
Carlos Garnacho
7d441000f7
GtkCssProvider: Allow '\t' when parsing values.
2010-12-04 15:38:26 +01:00
Carlos Garnacho
39ce35dd75
GtkCssProvider: Improve default CSS.
2010-12-04 15:38:26 +01:00
Carlos Garnacho
4e02218f52
Use GdkRGBA all around in GtkStyleContext.
2010-12-04 15:38:25 +01:00
Carlos Garnacho
0a0a1a20a7
GtkCssProvider: Make it able to parse enums.
2010-12-04 15:38:23 +01:00
Carlos Garnacho
d03caa4683
GtkCssProvider: Run through the widget path in the correct order.
...
Comparing a selector with a widget path was being done backwards since
the change to use GtkContainer::get_path_for_child().
2010-12-04 15:38:23 +01:00
Carlos Garnacho
c2f47063c3
GtkCssProvider: Parse default/sorted region flags.
2010-12-04 15:38:22 +01:00
Carlos Garnacho
4a9890e3ab
GtkCssProvider: Parse missing widget states.
2010-12-04 15:38:22 +01:00
Carlos Garnacho
a79626b7fb
Add theming docs
...
Both API and file format is documented, there's still missing
a migration doc though.
2010-12-04 15:38:21 +01:00
Benjamin Berg
e8c103f652
Use cairo gobject support instead of a new boxed type.
2010-12-04 15:38:20 +01:00
Carlos Garnacho
88a3c2daae
GtkGradient: Handle symbolic gradients.
...
The css parser has been modified to parse correctly radial gradients:
background-image: -gtk-gradient (radial,
center center, 0,
center center, 0.8,
from (#000 ), to (#fff));
The theming engine has been modified to correctly animate these,
as well as transitions between different pattern types.
2010-12-04 15:38:20 +01:00
Carlos Garnacho
f9788eb173
GtkCssProvider: Add support for @import rules
...
Now other CSS files can be referenced from the currently parsed file:
@import url (other-file.css);
@import url (/some/file.css);
2010-12-04 15:38:18 +01:00
Carlos Garnacho
0ef48c0bde
GtkCssProvider: no need for resetting the parser prior to parsing data
...
This is done anyway on each iteration to parse_rule() in parse_stylesheet()
2010-12-04 15:38:18 +01:00
Carlos Garnacho
8e96e4e41f
GtkCssProvider: improve file paths parser.
...
It will now return a full path, and check about the file being sane.
2010-12-04 15:38:18 +01:00
Carlos Garnacho
1772b00e85
GtkCssProvider: Transform custom colors to a @define-color rule.
...
Given there are other rules such as @import (which will be supported),
keep a sane namespace here, so for (re)defining a color name, in the CSS
file it will look like:
@define-color color-name #fff;
@define-color other-color mix (@color-name, #f00, 0.4);
2010-12-04 15:38:18 +01:00
Carlos Garnacho
5c2cf1e934
Plug some leaks.
2010-12-04 15:38:18 +01:00
Carlos Garnacho
5c8a818671
Fix typo in the Gtk9Slice parser.
2010-12-04 15:38:17 +01:00
Carlos Garnacho
20051e02eb
GtkCssProvider: use mapped file to read CSS files.
2010-12-04 15:38:16 +01:00
Carlos Garnacho
80cf01c271
GtkCssProvider: unset filename on load_from_data()
2010-12-04 15:38:16 +01:00
Carlos Garnacho
7ee564c7cd
GtkCssProvider: Add a parser for 9slice typed properties.
...
The value it parses is similar to the border-image CSS3 property,
so strings like this will be accepted:
border-image: url (foo.png) 4 3 4 3 repeat repeat;
the image path is relative to the parsed CSS file dirname if no
absolute path is provided.
2010-12-04 15:38:16 +01:00
Carlos Garnacho
679ff63d5c
GtkCssProvider: Add gtk_css_provider_get_named()
...
This functions loads a CSS file from a installed theme.
2010-12-04 15:38:15 +01:00
Carlos Garnacho
3fc5c87bcb
GtkCssProvider: Add a parser for gradients.
2010-12-04 15:38:12 +01:00
Carlos Garnacho
c908e263ac
GtkCssProvider: strip whitespaces in symbolic color values.
2010-12-04 15:38:11 +01:00
Carlos Garnacho
f12d7409cc
Allow linefeeds in property values.
2010-12-04 15:38:11 +01:00
Carlos Garnacho
58a51bca97
GtkStyle: Fill in x/ythickness and font_desc from the style context.
2010-12-04 15:38:11 +01:00