Commit Graph

42 Commits

Author SHA1 Message Date
Alexander Larsson
7603e6e473 css: Use GtkCssValues instead of GValue in the css machinery
Also, in places where we're computing a new CssValue based on an
old one, make sure that if nothing changes we're returning a reference
to the old one, rather than creating a new identical instance.
2012-03-08 11:03:57 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Benjamin Otte
e84af235ee css: Implement padding as numbers
Also remove the now unused border parsing function for shorthands.
2012-02-02 03:14:02 +01:00
Benjamin Otte
3c4b8a676f css: Port margin properties to GtkCssNumber 2012-02-02 03:14:01 +01:00
Benjamin Otte
a63ff72406 css: Convert border-radius to GtkCssNumber
We can do % now, wohoo!
2012-02-02 03:14:00 +01:00
Benjamin Otte
762ea4793f css: Make border-width a length property 2012-02-02 03:14:00 +01:00
Benjamin Otte
05f14af24c css: Make the 'currentColor' keyword a symbolic color
This is the first step on a quest to ensure that there is only ever one
GType in use for GValues in every stage of the CSS resolving process.
2012-02-02 00:40:33 +01:00
Cosimo Cecchi
09b4658c06 shorthand: fix parsing of currentColor for border-color shorthand
Code for border-color was missing the currentColor parsing.
2012-01-11 17:35:59 -05:00
Benjamin Otte
5939baa556 styleproperty: Make query function take a vfunc
This way we can use different methods to query properties and aren't
bound to a GtkStyleProperties object.
2012-01-11 15:48:54 +01:00
Benjamin Otte
738f96252e shorthand: Get rid of GParameter dance
Instead assign properties directly.
2012-01-11 15:48:54 +01:00
Benjamin Otte
53b2f05a64 shorthand: Unify unpack_border()
Just use the property names.
2012-01-11 15:48:54 +01:00
Benjamin Otte
df88700230 shorthand: Do an unpack function to assign to everything
It's basically the opposite to pack_first_element() - it takes the given
value and stores it in all subproperties.
2012-01-11 15:48:54 +01:00
Benjamin Otte
73fac24a3a shorthand: Add a "pack_first_element" pack function
And use it where appropriate.
See the docs in the function for what it does.
2012-01-11 15:48:53 +01:00
Benjamin Otte
6ebb85a69e shorthand: Unify border parsing code
Parse border.{top,right,bottom,left} into subproperties {1,2,3,4}.
2012-01-11 15:48:53 +01:00
Benjamin Otte
78fee2f54b shorthand: Remove hack
This hack was used for parsing back before the refactoring.
2012-01-11 15:48:53 +01:00
Benjamin Otte
e603992ac7 shorthand: Move pack funcs from base class
Also make the vfuncs take the shorthand as an argument.
2012-01-11 15:48:53 +01:00
Benjamin Otte
e9cd339573 css: Add outline CSS properties 2012-01-09 18:38:00 +01:00
Paolo Borelli
c167b4129e Also add border-{top|right|bottom|left} shorthands 2012-01-09 18:37:59 +01:00
Paolo Borelli
0120aaace5 Add the border css shorthand 2012-01-09 18:37:59 +01:00
Paolo Borelli
6525ed76e0 Rename parse_border
For consistency we will use this name for the boder shorthand.
2012-01-09 18:37:59 +01:00
Paolo Borelli
e69f14cf2b Add border-{top|left|bottom|right}-style properties
Add all the border-style subproperties and turn border-style itself in a
shorthand.
2012-01-09 18:37:58 +01:00
Benjamin Otte
bc9373fb43 styleproperty: Parse all values for background-repeat
... and its component in the background property.
2012-01-09 18:37:58 +01:00
Benjamin Otte
181ac0280d shorthand: Implement the 'background' shorthand
Weee, shorthands are now really trivial \o/
2012-01-09 18:37:58 +01:00
Benjamin Otte
96abf8c725 shorthand: Make border-image unget/settable 2012-01-09 18:37:57 +01:00
Benjamin Otte
f014d4f02e shorthand: Don't require pack/unpack functions
When using G_TYPE_NONE as the shorthand's type, the property is not
gettable/settable using regular APIs, so it essentially doesn't exist.
As it should be.
2012-01-09 18:37:57 +01:00
Benjamin Otte
37b11b6c8a borderimage: Convert to using GtkCssImage 2012-01-09 18:37:57 +01:00
Benjamin Otte
a9d1be0bef stylecontext: Remove GtkStylePropertyContext from pack funcs 2012-01-09 18:37:56 +01:00
Benjamin Otte
47a27a00f5 shorthand: Remove old parse func support
It's not used anymore
2012-01-09 18:37:54 +01:00
Benjamin Otte
069cb74691 shorthand: Do font parsing the new way 2012-01-09 18:37:54 +01:00
Benjamin Otte
f6422513b1 shorthand: Update border-image parsing
Also update tests. None is not a valid value...
2012-01-09 18:37:54 +01:00
Benjamin Otte
442040876a shorthand: Move border-color to new parsing code 2012-01-09 18:37:54 +01:00
Benjamin Otte
cd4470cfd3 shorthand: Move border radius parsing to new parsing code
We also now properly allow assigning an integer value to the
border-radius property.
2012-01-09 18:37:54 +01:00
Benjamin Otte
13aac54d19 shorthand: Implement border parsing with new parse func 2012-01-09 18:37:54 +01:00
Benjamin Otte
148d8fbca8 shorthand: Allow registering a new parse func 2012-01-09 18:37:54 +01:00
Benjamin Otte
389531d15d styleproperty: require property in _gtk_style_property_parse_value()
Other code uses _gtk_css_style_parse_value() instead now.
2012-01-09 18:37:53 +01:00
Benjamin Otte
30eb26087c css: Feed sections to CSS lookup code 2012-01-09 18:37:53 +01:00
Benjamin Otte
55a38f4746 shorthand: Remove a bunch of unused functionality
- The unset func is no longer used
- Shorthands can't be printed
- property_parse funcs and initial values aren't used
2012-01-09 18:37:53 +01:00
Benjamin Otte
d9c5d37e56 shorthand: shorthands can't be inherited
... so remove the flag handling.
2012-01-09 18:37:52 +01:00
Benjamin Otte
7a4bbc8f35 styleproperty: Add GtkStyleProperty::value-type 2012-01-09 18:37:52 +01:00
Benjamin Otte
2128b356b2 shorthand: Add a property for all subproperties 2012-01-09 18:37:52 +01:00
Benjamin Otte
927b922208 styleproperty: Add custom registration func for shorthands 2012-01-09 18:37:52 +01:00
Benjamin Otte
d4344164ac styleproperty: Move shorthand declarations to new file 2012-01-09 18:37:52 +01:00