]>
Pileus Git - ~andy/gtk/log
Benjamin Otte [Mon, 2 Jan 2012 11:12:29 +0000 (12:12 +0100)]
styleproperty: Move pspec to GtkCssCustomProperty
It's only used there.
Benjamin Otte [Mon, 2 Jan 2012 09:41:41 +0000 (10:41 +0100)]
styleproperty: Move property_parse_func member
It belongs in GtkCssCustomProperty
Benjamin Otte [Mon, 2 Jan 2012 09:37:04 +0000 (10:37 +0100)]
styleproperty: Add custom parser for custom properties
In particular, move the property_parse_func handling to
GtkCssCustomProperty exclusively.
Benjamin Otte [Mon, 2 Jan 2012 10:54:13 +0000 (11:54 +0100)]
styleproperty: Stop using pspecs
The pspec type is wrong most of the time anyway.
Benjamin Otte [Mon, 2 Jan 2012 10:53:36 +0000 (11:53 +0100)]
styleproperties: Don't validate values anymore
Pspecs are on their way out, so validation is, too.
Benjamin Otte [Mon, 2 Jan 2012 10:27:54 +0000 (11:27 +0100)]
styleproperty: Don't use gtk_style_properties_register_property()
This would make the internal properties custom properties. And they are
not.
Also get rid of default initial values, we now specify the correct one
at all times.
Benjamin Otte [Mon, 2 Jan 2012 10:12:46 +0000 (11:12 +0100)]
styleproperty: Make the register functin take varargs
.. for the initial value.
Benjamin Otte [Mon, 2 Jan 2012 09:29:13 +0000 (10:29 +0100)]
styleproperty: Don't register a property parse func
Nobody does that anymore.
Benjamin Otte [Mon, 2 Jan 2012 09:21:57 +0000 (10:21 +0100)]
styleproperty: Move implementations to separate file
Benjamin Otte [Mon, 2 Jan 2012 09:06:47 +0000 (10:06 +0100)]
styleproperty: Let parse_value() initialize the value
... and document that behavior.
Benjamin Otte [Mon, 2 Jan 2012 08:53:03 +0000 (09:53 +0100)]
styleproperty: Move parse func
It's specific to GtKCssStyleProperty after all.
Benjamin Otte [Mon, 2 Jan 2012 08:22:35 +0000 (09:22 +0100)]
shorthand: Remove old parse func support
It's not used anymore
Benjamin Otte [Mon, 2 Jan 2012 08:19:27 +0000 (09:19 +0100)]
shorthand: Do font parsing the new way
Benjamin Otte [Mon, 2 Jan 2012 03:12:41 +0000 (04:12 +0100)]
shorthand: Update border-image parsing
Also update tests. None is not a valid value...
Benjamin Otte [Mon, 2 Jan 2012 03:11:20 +0000 (04:11 +0100)]
shorthand: Initialize unparsed values
All values that the parse funcs didn't parse are initialized to
'initial'.
Benjamin Otte [Mon, 2 Jan 2012 02:43:48 +0000 (03:43 +0100)]
shorthand: Move border-color to new parsing code
Benjamin Otte [Mon, 2 Jan 2012 02:05:49 +0000 (03:05 +0100)]
shorthand: Move border radius parsing to new parsing code
We also now properly allow assigning an integer value to the
border-radius property.
Benjamin Otte [Mon, 2 Jan 2012 01:48:35 +0000 (02:48 +0100)]
themingengine: Don't use GtkBorderRadius struct
use GtkBorderCornerRadius instead. Also, don't do NULL checks anymore,
the property is guaranteed to never return NULL.
Benjamin Otte [Mon, 2 Jan 2012 01:45:52 +0000 (02:45 +0100)]
styleproperty: Set a default value for border-*-radius
That way, we don't have to check if it is indeed set.
Benjamin Otte [Mon, 2 Jan 2012 01:39:20 +0000 (02:39 +0100)]
roundedbox: Use GtkCssBorderCornerRadius type
GtkCssBorderRadius is going away.
Benjamin Otte [Mon, 2 Jan 2012 01:33:56 +0000 (02:33 +0100)]
shorthand: Implement border parsing with new parse func
Benjamin Otte [Mon, 2 Jan 2012 01:23:54 +0000 (02:23 +0100)]
shorthand: Allow registering a new parse func
Benjamin Otte [Mon, 2 Jan 2012 01:22:52 +0000 (02:22 +0100)]
styleproperty: Remove _gtk_style_property_unpack()
The function is no longer needed in public API
Benjamin Otte [Mon, 2 Jan 2012 01:05:05 +0000 (02:05 +0100)]
shorthand: Redo shorthand value parsing
The new approach does not need unpack functions anymore.
Benjamin Otte [Sun, 1 Jan 2012 23:45:29 +0000 (00:45 +0100)]
styleproperty: Make parse_value() a vfunc
Benjamin Otte [Sun, 1 Jan 2012 23:28:56 +0000 (00:28 +0100)]
styleproperty: Move pspec to GtkCssStyleProperty
shorthands don't use pspecs anymore.
Benjamin Otte [Sun, 1 Jan 2012 23:23:53 +0000 (00:23 +0100)]
css: Use _gtk_style_property_get_value_type() where appropriate
Benjamin Otte [Sun, 1 Jan 2012 23:14:23 +0000 (00:14 +0100)]
styleproperty: require property in _gtk_style_property_parse_value()
Other code uses _gtk_css_style_parse_value() instead now.
Benjamin Otte [Sun, 1 Jan 2012 22:16:35 +0000 (23:16 +0100)]
css: Feed sections to CSS lookup code
Benjamin Otte [Sun, 1 Jan 2012 20:58:45 +0000 (21:58 +0100)]
styleproperty: Make query() and assign() vfuncs
... and implement them in the 2 known subclasses.
Benjamin Otte [Sun, 1 Jan 2012 17:28:27 +0000 (18:28 +0100)]
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.
Benjamin Otte [Sun, 1 Jan 2012 17:14:51 +0000 (18:14 +0100)]
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...
Benjamin Otte [Sat, 31 Dec 2011 22:20:44 +0000 (23:20 +0100)]
css: 'transparent' is a valid color everywhere
Benjamin Otte [Sat, 31 Dec 2011 22:07:13 +0000 (23:07 +0100)]
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.
Benjamin Otte [Sat, 31 Dec 2011 22:04:32 +0000 (23:04 +0100)]
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.
Benjamin Otte [Sat, 31 Dec 2011 21:28:04 +0000 (22:28 +0100)]
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
Benjamin Otte [Sat, 31 Dec 2011 21:17:25 +0000 (22:17 +0100)]
styleproperties: Implement unsetting directly
With subproperties, there's no need anymore for custom unset functions.
Benjamin Otte [Sat, 31 Dec 2011 18:59:16 +0000 (19:59 +0100)]
styleproperty: Move member variables
These variables are only relevant for style properties, but not for
shorthands, so put them there.
Benjamin Otte [Sat, 31 Dec 2011 18:58:44 +0000 (19:58 +0100)]
shorthand: shorthands can't be inherited
... so remove the flag handling.
Benjamin Otte [Sat, 31 Dec 2011 18:45:17 +0000 (19:45 +0100)]
css: Move a bunch of functions
... from GtkStyleProperty to GtkCssStyleProperty.
Benjamin Otte [Sat, 31 Dec 2011 18:28:59 +0000 (19:28 +0100)]
styleproperty: Move id handling
only real style properties can have an id, so let
GtkCssStylePropertyClass handle it.
Benjamin Otte [Sat, 31 Dec 2011 18:03:53 +0000 (19:03 +0100)]
styleproperty: Add gtk_style_property_assign()
Benjamin Otte [Sat, 31 Dec 2011 16:58:30 +0000 (17:58 +0100)]
styleproperties: Use _gtk_style_property_get_value_type()
... and check the case where the property is not get/settable.
Benjamin Otte [Sat, 31 Dec 2011 16:36:22 +0000 (17:36 +0100)]
styleproperty: Add GtkStyleProperty::value-type
Benjamin Otte [Sat, 31 Dec 2011 15:40:06 +0000 (16:40 +0100)]
styleproperty: Use _gtk_style_property_get_name()
Benjamin Otte [Sat, 31 Dec 2011 15:31:25 +0000 (16:31 +0100)]
shorthand: Add a property for all subproperties
Benjamin Otte [Sat, 31 Dec 2011 15:08:23 +0000 (16:08 +0100)]
styleproperty: unconstify
GtkStyleProperty is a real GObject now, so treat it like one and don't
use const.
Benjamin Otte [Sat, 31 Dec 2011 14:50:56 +0000 (15:50 +0100)]
styleproperty: Remove unuse args from register()
Those arguments are only relevant for shorthands.
Benjamin Otte [Sat, 31 Dec 2011 14:43:13 +0000 (15:43 +0100)]
styleproperty: Add custom registration func for shorthands
Benjamin Otte [Sat, 31 Dec 2011 14:05:09 +0000 (15:05 +0100)]
styleproperty: Move shorthand declarations to new file
Benjamin Otte [Sat, 31 Dec 2011 13:55:26 +0000 (14:55 +0100)]
styleproperty: border image is not a generic conversion thingy
Benjamin Otte [Sat, 31 Dec 2011 13:34:42 +0000 (14:34 +0100)]
styleproperty: Add a name property
And move the properties array to GtkStylePropertyClass.
Also add some docs.
Benjamin Otte [Sat, 31 Dec 2011 12:50:03 +0000 (13:50 +0100)]
styleproperty: Get rid of _gtk_style_property_is_shorthand()
Use GTK_IS_CSS_SHORTHAND_PROPERTY() instead now that we have it.
Benjamin Otte [Sat, 31 Dec 2011 12:43:31 +0000 (13:43 +0100)]
styleproperty: Split into shorthand and real style properties
Benjamin Otte [Sat, 31 Dec 2011 12:38:22 +0000 (13:38 +0100)]
tests: Quit widget-factory when someone presses quit
Benjamin Otte [Sat, 31 Dec 2011 02:54:17 +0000 (03:54 +0100)]
styleproperty: Make this an object
Benjamin Otte [Sat, 31 Dec 2011 00:14:47 +0000 (01:14 +0100)]
styleproperty: Add _gtk_style_property_query()
This way, we only need to export one function, not 3.
Benjamin Otte [Sat, 31 Dec 2011 00:05:50 +0000 (01:05 +0100)]
styleproperties: Add _gtk_style_properties_peek_property()
Benjamin Otte [Fri, 30 Dec 2011 23:54:51 +0000 (00:54 +0100)]
styleproperties: Remove unused function from private header
_gtk_style_properties_resolve_property() was added erroneously in
c09148ca09081cd009cb9a328441b4b43008e352 but was never implemented.
Benjamin Otte [Fri, 30 Dec 2011 12:14:57 +0000 (13:14 +0100)]
tests: Add a test for 'none'
Benjamin Otte [Fri, 30 Dec 2011 12:13:44 +0000 (13:13 +0100)]
css: 'none' is not a value background-repeat
Benjamin Otte [Fri, 30 Dec 2011 11:51:03 +0000 (12:51 +0100)]
css: Remove generic 'none' handling
Includes updated tests.
Who could have thought that our tests were broken. Ooops.
Benjamin Otte [Fri, 30 Dec 2011 11:53:51 +0000 (12:53 +0100)]
win32: Fix CSS for 'none' value going away
We want colors to be 'transparent' and not 'none'.
Benjamin Otte [Fri, 30 Dec 2011 11:44:16 +0000 (12:44 +0100)]
styleproperty: Add custom 'none' handling
The generic 'none' handling needs to go, because 'none' is not a valid
value most of the time.
Benjamin Otte [Thu, 29 Dec 2011 21:05:10 +0000 (22:05 +0100)]
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'.
Benjamin Otte [Thu, 29 Dec 2011 21:03:02 +0000 (22:03 +0100)]
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.
Benjamin Otte [Thu, 29 Dec 2011 15:19:14 +0000 (16:19 +0100)]
tests: Add tests for 'inherit' and 'initial'
Benjamin Otte [Thu, 29 Dec 2011 15:18:12 +0000 (16:18 +0100)]
css: Add generic support for 'inherit' and 'initial'
CSS3 says they work for every property, so here we go.
Benjamin Otte [Thu, 29 Dec 2011 13:26:45 +0000 (14:26 +0100)]
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.
Benjamin Otte [Thu, 29 Dec 2011 13:20:43 +0000 (14:20 +0100)]
cssprovider: Remove has_inherit flag from rulesets
It's not used anymore
Benjamin Otte [Thu, 29 Dec 2011 13:15:39 +0000 (14:15 +0100)]
cssprovider: Don't do inheritance anymore
Its' done in GtkCssLookup with the help of GtkStyleContext::parent now.
Benjamin Otte [Thu, 29 Dec 2011 13:04:33 +0000 (14:04 +0100)]
css: Make CSS resolving work according to spec
See inline code comments taken from
http://dev.w3.org/csswg/css3-cascade/#cascade
This now respects the special values "inherit" and "initial" properly.
Note that those values cannot be parsed yet. This will be added in a
future commit.
Benjamin Otte [Thu, 29 Dec 2011 13:04:19 +0000 (14:04 +0100)]
styleproperty: Add _gtk_style_property_get_initial_value()
Benjamin Otte [Thu, 29 Dec 2011 12:38:45 +0000 (13:38 +0100)]
css: Pass the parent context to _gtk_css_lookup_resolve()
This way, we can resolve inherit properties.
Benjamin Otte [Thu, 29 Dec 2011 11:40:21 +0000 (12:40 +0100)]
widget: Set parent style context
Benjamin Otte [Thu, 29 Dec 2011 11:30:25 +0000 (12:30 +0100)]
API: Add GtkStyleContext::parent
We need this for proper support of CSS inherit.
Benjamin Otte [Thu, 29 Dec 2011 01:28:32 +0000 (02:28 +0100)]
styleproperty: Pass initial value explicitly
Benjamin Otte [Thu, 29 Dec 2011 01:27:54 +0000 (02:27 +0100)]
css: Add GtkCssSpecialValue
Benjamin Otte [Wed, 28 Dec 2011 23:28:56 +0000 (00:28 +0100)]
css: Add some docs to GtkCssLookup
In particular, document which parts of the CSS value querying we're
doing here.
Benjamin Otte [Wed, 28 Dec 2011 22:16:51 +0000 (23:16 +0100)]
reftests: Add test for pseudo-class matching
Previous GTK matched pseudoclasses not based on CSS rules, but based on
their value in the enumeration. This is now fixed.
Benjamin Otte [Wed, 28 Dec 2011 21:59:55 +0000 (22:59 +0100)]
css: Redo StyleProvider interface
We now use the GtkStleProviderPrivate interface, which hopefully is
faster and more conformant to CSS. Long term, it definitely should be
both.
I would have liked to split this up into multiple commits, but couldn't
find a way.
Benjamin Otte [Wed, 28 Dec 2011 21:05:35 +0000 (22:05 +0100)]
styleproperties: Add a hacky function to redirect color lookups
This will soon be necessary.
FIXME: Make sure this gets removed again.
Benjamin Otte [Wed, 28 Dec 2011 15:15:00 +0000 (16:15 +0100)]
symboliccolor: Add _gtk_symbolic_color_resolve_full()
Benjamin Otte [Tue, 27 Dec 2011 19:41:25 +0000 (20:41 +0100)]
stylecontext: Separate properties by states
We don't want to mix states the wrong way. And the current approach does
that.
Benjamin Otte [Tue, 27 Dec 2011 16:41:48 +0000 (17:41 +0100)]
stylecontext: Pass state to style data lookup function
Benjamin Otte [Fri, 23 Dec 2011 13:30:59 +0000 (14:30 +0100)]
css: Add _gtk_style_property_get_count()
Benjamin Otte [Fri, 23 Dec 2011 13:23:52 +0000 (14:23 +0100)]
cssprovider: Keep a bitmask for the properties
That way we can easily tell wich properties are in use.
Benjamin Otte [Fri, 23 Dec 2011 13:12:04 +0000 (14:12 +0100)]
css: Add _gtk_style_property_get_id()
Benjamin Otte [Fri, 23 Dec 2011 11:31:16 +0000 (12:31 +0100)]
styleproperty: Assign a unique id to every styleproperty
Benjamin Otte [Fri, 23 Dec 2011 21:29:34 +0000 (22:29 +0100)]
tests: Add tests for GtkBitmask
Benjamin Otte [Fri, 23 Dec 2011 11:16:18 +0000 (12:16 +0100)]
gtk: Add GtkBitmask
The CSS code likes to have that very much.
Stefan Sauer [Mon, 9 Jan 2012 17:16:53 +0000 (18:16 +0100)]
gtkscale: fix bogus compare func
The GtkScaleMark values are gdouble, a simple a-b compare func would fail for
values with the same integer value. This breaks the sorting and causes random
marker label placement.
Rob Bradford [Mon, 9 Jan 2012 17:15:00 +0000 (17:15 +0000)]
wayland: Constrain the window configure requests to the window's geometry
When we receive a configure event from Wayland telling us to resize our
surface we check against the geometry constraints for the window to ensure we
do not resize below the minimum and maximum limits.
Rob Bradford [Mon, 9 Jan 2012 17:11:22 +0000 (17:11 +0000)]
wayland: Implement set_geometry_hints vfunc
Our trivial implementation simply saves the passed in parameters into the
Wayland private data structure.
Rui Matos [Thu, 22 Dec 2011 14:49:50 +0000 (14:49 +0000)]
scrolledwindow: Render the background so that it can be styled
Rui Matos [Thu, 22 Dec 2011 14:44:50 +0000 (14:44 +0000)]
window: Stop setting state flags on the style context for drawing
This also removes setting the FOCUSED state flag when
gtk_window_has_toplevel_focus() since this effect can now be done with the new
WINDOW_UNFOCUSED flag instead which actually works better regarding X grabs
and modal windows.
Rui Matos [Thu, 22 Dec 2011 02:59:16 +0000 (02:59 +0000)]
treeview: Use the widget state flags as a base for drawing expanders
Rui Matos [Thu, 22 Dec 2011 02:58:27 +0000 (02:58 +0000)]
treeview: Stop setting state flags on the style context for drawing
Rui Matos [Thu, 22 Dec 2011 00:37:10 +0000 (00:37 +0000)]
trayicon-x11: Stop setting state flags on the style context for drawing
Rui Matos [Thu, 22 Dec 2011 00:31:07 +0000 (00:31 +0000)]
toolitemgroup: Use the widget state flags as a base for drawing