Commit Graph

30404 Commits

Author SHA1 Message Date
Benjamin Otte
8ab426e6d5 themingengine: Don't use GtkBorderRadius struct
use GtkBorderCornerRadius instead. Also, don't do NULL checks anymore,
the property is guaranteed to never return NULL.
2012-01-09 18:37:54 +01:00
Benjamin Otte
ea6a898344 styleproperty: Set a default value for border-*-radius
That way, we don't have to check if it is indeed set.
2012-01-09 18:37:54 +01:00
Benjamin Otte
fdb3abefc3 roundedbox: Use GtkCssBorderCornerRadius type
GtkCssBorderRadius is going away.
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
14994e3fc9 styleproperty: Remove _gtk_style_property_unpack()
The function is no longer needed in public API
2012-01-09 18:37:54 +01:00
Benjamin Otte
01548bfcbe shorthand: Redo shorthand value parsing
The new approach does not need unpack functions anymore.
2012-01-09 18:37:53 +01:00
Benjamin Otte
e876d9fed5 styleproperty: Make parse_value() a vfunc 2012-01-09 18:37:53 +01:00
Benjamin Otte
4821e52cf2 styleproperty: Move pspec to GtkCssStyleProperty
shorthands don't use pspecs anymore.
2012-01-09 18:37:53 +01:00
Benjamin Otte
5ae00c3755 css: Use _gtk_style_property_get_value_type() where appropriate 2012-01-09 18:37:53 +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
79a171de0a styleproperty: Make query() and assign() vfuncs
... and implement them in the 2 known subclasses.
2012-01-09 18:37:53 +01:00
Benjamin Otte
b904679a11 styleproperty: Move value printing to real properties
We can't print shorthands, so don't try.
In particular, I want to get away from shorthands being representable
using GValue, and this function kinda requires that.
2012-01-09 18:37:53 +01:00
Benjamin Otte
078fc725e0 css: Split generic parse/print functions out
It seems to be some sort of sport for me to split them out and merge
them back in...
2012-01-09 18:37:53 +01:00
Benjamin Otte
f5fafb18c9 css: 'transparent' is a valid color everywhere 2012-01-09 18:37:53 +01:00
Benjamin Otte
36e1bcac3c css: No longer expose internal properties
... in gtk_style_properties_lookup_property(). Those properties will
soon stop having pspecs or even being gettable and settable, so better
not tell anyone about it.
2012-01-09 18:37:53 +01:00
Benjamin Otte
73a632a4ae css: Handle custom properties in a custom object
This way we can also get rid of the hack where we required modifying the
pspec after creation, as the name is now a separate property.
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
674485a138 styleproperties: Implement unsetting directly
With subproperties, there's no need anymore for custom unset functions.
2012-01-09 18:37:53 +01:00
Benjamin Otte
341a738dc6 styleproperty: Move member variables
These variables are only relevant for style properties, but not for
shorthands, so put them there.
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
544d210a61 css: Move a bunch of functions
... from GtkStyleProperty to GtkCssStyleProperty.
2012-01-09 18:37:52 +01:00
Benjamin Otte
0a3ac5efbc styleproperty: Move id handling
only real style properties can have an id, so let
GtkCssStylePropertyClass handle it.
2012-01-09 18:37:52 +01:00
Benjamin Otte
edb8bf4b1d styleproperty: Add gtk_style_property_assign() 2012-01-09 18:37:52 +01:00
Benjamin Otte
c9dc9d5a88 styleproperties: Use _gtk_style_property_get_value_type()
... and check the case where the property is not get/settable.
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
7a76694780 styleproperty: Use _gtk_style_property_get_name() 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
4383701e25 styleproperty: unconstify
GtkStyleProperty is a real GObject now, so treat it like one and don't
use const.
2012-01-09 18:37:52 +01:00
Benjamin Otte
a3a580d53e styleproperty: Remove unuse args from register()
Those arguments are only relevant for shorthands.
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
Benjamin Otte
6b386dc574 styleproperty: border image is not a generic conversion thingy 2012-01-09 18:37:52 +01:00
Benjamin Otte
4e79ed7f4f styleproperty: Add a name property
And move the properties array to GtkStylePropertyClass.
Also add some docs.
2012-01-09 18:37:52 +01:00
Benjamin Otte
81b2bb0ade styleproperty: Get rid of _gtk_style_property_is_shorthand()
Use GTK_IS_CSS_SHORTHAND_PROPERTY() instead now that we have it.
2012-01-09 18:37:51 +01:00
Benjamin Otte
f9485241b1 styleproperty: Split into shorthand and real style properties 2012-01-09 18:37:51 +01:00
Benjamin Otte
f62c79b41c tests: Quit widget-factory when someone presses quit 2012-01-09 18:37:51 +01:00
Benjamin Otte
78dc75a350 styleproperty: Make this an object 2012-01-09 18:37:51 +01:00
Benjamin Otte
3e24b5dbbe styleproperty: Add _gtk_style_property_query()
This way, we only need to export one function, not 3.
2012-01-09 18:37:51 +01:00
Benjamin Otte
2573e72f49 styleproperties: Add _gtk_style_properties_peek_property() 2012-01-09 18:37:51 +01:00
Benjamin Otte
38e1c0a2d6 styleproperties: Remove unused function from private header
_gtk_style_properties_resolve_property() was added erroneously in
c09148ca09 but was never implemented.
2012-01-09 18:37:51 +01:00
Benjamin Otte
06960bb9d6 tests: Add a test for 'none' 2012-01-09 18:37:51 +01:00
Benjamin Otte
4da493402d css: 'none' is not a value background-repeat 2012-01-09 18:37:51 +01:00
Benjamin Otte
6fdf6ba68f css: Remove generic 'none' handling
Includes updated tests.
Who could have thought that our tests were broken. Ooops.
2012-01-09 18:37:51 +01:00
Benjamin Otte
7d353fbccf win32: Fix CSS for 'none' value going away
We want colors to be 'transparent' and not 'none'.
2012-01-09 18:37:51 +01:00
Benjamin Otte
c77dba2767 styleproperty: Add custom 'none' handling
The generic 'none' handling needs to go, because 'none' is not a valid
value most of the time.
2012-01-09 18:37:51 +01:00
Benjamin Otte
78024504aa reftests: Add a test comparing inherit and initial
One test has all properties set to 'inherit', the other to 'initial'.
This should result in the same result, as inherit will ensure every
widget inherits the same value, and for the toplevel 'inherit' is
defined as being identical to 'initial'.
2012-01-09 18:37:51 +01:00
Benjamin Otte
53bb230e12 reftests: Add a test for a parent in a different state
inherit in those cases should inherit from that different state, not
from this state.
2012-01-09 18:37:51 +01:00
Benjamin Otte
e9dfb8d5b8 tests: Add tests for 'inherit' and 'initial' 2012-01-09 18:37:51 +01:00