a737adadf8
stylecontext: Make style_data_lookup() not take a state anymore
...
Instead, use the current state of the style context.
2012-04-17 08:59:14 +02:00
58b6d492b8
cssvalue: Add a custom RGBA value
...
Note: custom CSS properties still use the default GtkCssValue and always
will.
So there is a difference in css values used between those, even though
they both carry a GdkRGBA payload.
2012-04-17 08:59:14 +02:00
a33df2d1d6
cssvalue: Split number values into their own class
2012-04-17 08:59:13 +02:00
5ac9ba714a
styleproperty: Make _gtk_style_property_query() take a GValue
...
... and don't make it return a GtkCssValue. We want to use this for
compat with the old GValue APIs after all...
2012-04-17 08:59:11 +02:00
d5a2392cc7
stylecontext: Don't clear cache when only state changes
...
This takes more memory, but changes to backdrop or active state are
quite expensive otherwise.
2012-04-17 08:59:11 +02:00
585a1fae4f
stylecontext: Really queue style changes
...
Instead of instantly applying a new style, just mark the context as
invalid. Only apply the new style at layout time.
2012-04-17 08:59:10 +02:00
eb537b60f4
stylecontext: Optimize the common case of "style didn't change"
2012-04-17 08:59:10 +02:00
198cf93f0f
stylecontext: On failure, exit the loop, don't try again
...
Because we will fail again. And then we try again. And then we fail
again. Ad infinitum.
2012-04-17 08:59:09 +02:00
15be680540
stylecontext: Invalidate when setting classes/state/regions
...
... and nobody has called style_context_save().
2012-04-17 08:59:09 +02:00
44d49c900d
stylecontext: Use _gtk_style_context_queue_invalidate() on self
2012-04-17 08:59:09 +02:00
39ff874a11
stylecontext: Introduce _gtk_style_context_queue_invalidate()
...
This is for only queueing invalidations instead of doing a full
invalidation cycle.
2012-04-17 08:59:09 +02:00
1a51ea3ea3
stylecontext: Keep track of children
2012-04-17 08:59:09 +02:00
7f511f2b33
widget: Don't set widget path on style context
...
Instead, make the style context use the widget's path. Saves a bunch of
memory.
2012-04-17 08:59:09 +02:00
e5ab48ac59
stylecontext: Notify widget directly of changes
...
This way, we don't need to g_signal_connect(), which saves a bunch of
memory and performance.
2012-04-17 08:59:08 +02:00
1aa4a196dc
stylecontext: Add setter for widget
...
... and actually set the widget on the style context. Note that this
function does not take a reference on the widget, which is a very good
reason to keep it private.
2012-04-17 08:59:08 +02:00
a94b85d375
css: Make the style provider take a matcher as an input argument
2012-04-17 08:59:07 +02:00
a2ded8b72a
styleprovider: Add a custom object for a list of style providers
...
This way, we don't have to do magic inside GtkStyleContext, but have a
real API.
As a cute bonus, this object implements GtkStyleProvider itself. So we
can just pretend there's only one provider.
2012-04-17 08:59:07 +02:00
015e3a768f
stylecontext: Stop querying style providers for icon factories
...
Nobody implements this feature and I don't wanna maintain it. If it
turns out somebody is using it, we gotta invent something.
2012-04-17 08:59:07 +02:00
461803e407
gtk: Get gtkwidgetpath.h includes out of the public headers
...
and include them in the C files instead.
2012-03-19 02:26:16 +01:00
f9727ee1bf
stylecontext: Get rid of unused parameter
...
It was always FALSE
2012-03-16 17:53:57 +01:00
616cc5b96d
Use GtkCssValue in symbolic color resolving
...
We now store the symbolic colors as a GtkCssValue which means that
we can reuse the color when resolving and storing the color in
the computed values in the style context.
Additionally we keep a last_resolved GtkCssValue cache in the
GtkSymbolicColor, and if resolving the color returns the same as
last time we reuse the old value. This further increases sharing
of Css Values.
2012-03-08 14:52:10 +01:00
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
7844e8089c
types: Clean up gtkwidget.h includes
...
In particular gtksettings.h and gtkstylecontext.h needed to be included
in lots of places now.
Also, I order the includes alphabetically in a bunch of headers.
2012-03-03 19:45:03 +01:00
9d0febc9a6
Change FSF Address
2012-02-27 17:06:11 +00:00
f73ff748db
Add a deprecation mark to draw_insertion_cursor
...
This function has been replaced with gtk_render_insertion_cursor, but we
forgot to mark it as deprecated.
2012-02-27 17:48:37 +01:00
4e37d56d51
themingengine: move _gtk_theming_engine_set_context to private header
...
Where it belongs.
2012-02-14 16:36:56 -05:00
a63ff72406
css: Convert border-radius to GtkCssNumber
...
We can do % now, wohoo!
2012-02-02 03:14:00 +01:00
82c2dad178
themingengine: Add a private function to query lengths
2012-02-02 03:14:00 +01:00
581cc59945
stylecontext: Don't unref animation description
...
We get it without a ref since 6962b49a99
2012-01-12 01:10:26 +01:00
a815f10299
API: Add gtk_style_context_get_section()
...
This API allows querying the location where style properties were
defined. An example implementation will be committed soon.
2012-01-11 15:48:54 +01:00
6962b49a99
css: Introduce GtkCssComputedValues
...
To be used for storing computed values. Is the replacement for
GtkStyleProperties, which is now legacy code.
2012-01-11 15:48:54 +01:00
694a9114af
stylecontext: Simplify even more code
2012-01-11 15:48:54 +01:00
f27f8db2d8
stylecontext: Use our own color resolve function
...
... instead of using the StyleProperties.
2012-01-11 15:48:54 +01:00
abcae0cea4
stylecontext: Simplify function
...
Also, make it easier to port to what I want to do next. ;)
2012-01-11 15:48:54 +01:00
aa98aca45f
styleproperties: Remove color set function
...
Now that we do resolvage with the style context directly, this is no
longer needed.
2012-01-11 15:48:53 +01:00
2dc10600ea
Fix doc markup
2012-01-09 14:13:44 -05:00
2c5a8420b5
Set border-width to 0 in compute function
...
This reverts commit c276f53796 and
implements the same feature using the compute function.
A nice side effect is that gtk_style_property_get_border() and
gtk_style_property_get("border") to the same thing now.
2012-01-09 18:37:58 +01:00
84d294ee7f
stylecontext: NMake safe to call into during lookup
...
When resolving a lookup, we may want to query the current style context,
as in the next patch. This works now.
2012-01-09 18:37:57 +01:00
2c8ef919ae
stylecontext: Add _gtk_style_context_peek_property()
...
This allows peeking at the computed value for a property. This is useful
for looking at GtkCssImage.
2012-01-09 18:37:56 +01:00
9181282d88
style: Remove GtkStylePropertyContext again
...
We need to solve this differently. I have no idea yet how, but I'll
invent something later.
This only affects win32 theming and that's broken anyway.
2012-01-09 18:37:56 +01:00
4576653006
stylecontext: Export _gtk_style_context_resolve_color()
...
We'll need it soon.
2012-01-09 18:37:55 +01:00
f2dc63cc6a
css: Pass the real context to the CSS lookup
...
This will be necessary soon.
2012-01-09 18:37:55 +01:00
242893a031
css: Pass the parent context to _gtk_css_lookup_resolve()
...
This way, we can resolve inherit properties.
2012-01-09 18:37:50 +01:00
b50d2b74d7
API: Add GtkStyleContext::parent
...
We need this for proper support of CSS inherit.
2012-01-09 18:37:50 +01:00
ba5e7012b1
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.
2012-01-09 18:37:50 +01:00
899a381d31
stylecontext: Separate properties by states
...
We don't want to mix states the wrong way. And the current approach does
that.
2012-01-09 18:37:49 +01:00
a488d2184a
stylecontext: Pass state to style data lookup function
2012-01-09 18:37:49 +01:00
d005b01319
gtk/*: Use g_list_free_full() convenience function
2012-01-05 04:22:43 +01:00
d80ff7b5f1
stylecontext: always add the ARROW style class when rendering an arrow
...
When gtk_render_arrow() is called, always add an ARROW style class to
the GtkStyleContext before rendering, so themes can specify a different
color for it.
https://bugzilla.gnome.org/show_bug.cgi?id=665420
2011-12-05 09:37:21 -05:00
2ef5844bac
Introduce gtk_render_insertion_cursor
...
The new function provides an API that takes the PangoLayout and index
as input params, this way it handles strong and weak cursors internally
factoring out all code duplicated in the widgets that need to render
cursors.
https://bugzilla.gnome.org/show_bug.cgi?id=640317
2011-12-01 01:22:39 +01:00