Commit Graph

30251 Commits

Author SHA1 Message Date
13aac54d19 shorthand: Implement border parsing with new parse func 2012-01-09 18:37:54 +01:00
148d8fbca8 shorthand: Allow registering a new parse func 2012-01-09 18:37:54 +01:00
14994e3fc9 styleproperty: Remove _gtk_style_property_unpack()
The function is no longer needed in public API
2012-01-09 18:37:54 +01:00
01548bfcbe shorthand: Redo shorthand value parsing
The new approach does not need unpack functions anymore.
2012-01-09 18:37:53 +01:00
e876d9fed5 styleproperty: Make parse_value() a vfunc 2012-01-09 18:37:53 +01:00
4821e52cf2 styleproperty: Move pspec to GtkCssStyleProperty
shorthands don't use pspecs anymore.
2012-01-09 18:37:53 +01:00
5ae00c3755 css: Use _gtk_style_property_get_value_type() where appropriate 2012-01-09 18:37:53 +01:00
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
30eb26087c css: Feed sections to CSS lookup code 2012-01-09 18:37:53 +01:00
79a171de0a styleproperty: Make query() and assign() vfuncs
... and implement them in the 2 known subclasses.
2012-01-09 18:37:53 +01:00
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
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
f5fafb18c9 css: 'transparent' is a valid color everywhere 2012-01-09 18:37:53 +01:00
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
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
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
674485a138 styleproperties: Implement unsetting directly
With subproperties, there's no need anymore for custom unset functions.
2012-01-09 18:37:53 +01:00
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
d9c5d37e56 shorthand: shorthands can't be inherited
... so remove the flag handling.
2012-01-09 18:37:52 +01:00
544d210a61 css: Move a bunch of functions
... from GtkStyleProperty to GtkCssStyleProperty.
2012-01-09 18:37:52 +01:00
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
edb8bf4b1d styleproperty: Add gtk_style_property_assign() 2012-01-09 18:37:52 +01:00
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
7a4bbc8f35 styleproperty: Add GtkStyleProperty::value-type 2012-01-09 18:37:52 +01:00
7a76694780 styleproperty: Use _gtk_style_property_get_name() 2012-01-09 18:37:52 +01:00
2128b356b2 shorthand: Add a property for all subproperties 2012-01-09 18:37:52 +01:00
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
a3a580d53e styleproperty: Remove unuse args from register()
Those arguments are only relevant for shorthands.
2012-01-09 18:37:52 +01:00
927b922208 styleproperty: Add custom registration func for shorthands 2012-01-09 18:37:52 +01:00
d4344164ac styleproperty: Move shorthand declarations to new file 2012-01-09 18:37:52 +01:00
6b386dc574 styleproperty: border image is not a generic conversion thingy 2012-01-09 18:37:52 +01:00
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
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
f9485241b1 styleproperty: Split into shorthand and real style properties 2012-01-09 18:37:51 +01:00
f62c79b41c tests: Quit widget-factory when someone presses quit 2012-01-09 18:37:51 +01:00
78dc75a350 styleproperty: Make this an object 2012-01-09 18:37:51 +01:00
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
2573e72f49 styleproperties: Add _gtk_style_properties_peek_property() 2012-01-09 18:37:51 +01:00
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
06960bb9d6 tests: Add a test for 'none' 2012-01-09 18:37:51 +01:00
4da493402d css: 'none' is not a value background-repeat 2012-01-09 18:37:51 +01:00
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
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
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
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
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
e9dfb8d5b8 tests: Add tests for 'inherit' and 'initial' 2012-01-09 18:37:51 +01:00
57379adb3c css: Add generic support for 'inherit' and 'initial'
CSS3 says they work for every property, so here we go.
2012-01-09 18:37:51 +01:00
a6ac53e2a9 css: Change prototype of _gtk_css_selector_matches()
Passing the length of the widget path that is relevant is not necessary
anymore, it was only useful for inheritance. Instead, we now pass the
state flags and let the selector do the state matching for us.
2012-01-09 18:37:50 +01:00
a3225fdd42 cssprovider: Remove has_inherit flag from rulesets
It's not used anymore
2012-01-09 18:37:50 +01:00