Commit Graph

1130 Commits

Author SHA1 Message Date
561346bd40 Remove unused function modify_color_property 2010-12-05 22:07:30 +01:00
5361490db8 Bug 636511 - New style override functions do not work on textview
Emit ::style-set on overrider style changes, this is necessary
in the mean time so widgets not listening yet to ::style-updated
get the style changes.
2010-12-05 20:19:55 +01:00
d5df33c75f Fix abi check after recent merges 2010-12-05 12:18:30 -05:00
37719380ae Fix call to gtk_widget_override_cursor() 2010-12-04 18:26:34 +01:00
3d28adf317 Make gtk_widget_override_cursor() take GdkRGBAs
Even though the style properties have the GdkColor type, the other
gtk_widget_override_* API takes RGBA colors, so it is consistent
now.
2010-12-04 17:49:28 +01:00
07eeae1582 GtkWidget: add gtk_widget_render_icon_pixbuf()
and deprecate gtk_widget_render_icon()
2010-12-04 15:39:57 +01:00
15d997d58a GtkWidget: queue a resize when style context changed 2010-12-04 15:39:56 +01:00
9aca6c8071 GtkWidget: Add gtk_widget_override_cursor().
This function replaces gtk_widget_modify_cursor().
2010-12-04 15:39:54 +01:00
b0c87faa50 Add GtkModifierStyle as a private object
This object backs up gtk_widget_override_* operations. This object
is not meant to be public because any intention to modify widgets'
style in a themeable way should involve using regions/classes, so
they're modifiable through CSS. As such, the API is really
short-scoped.
2010-12-04 15:39:54 +01:00
297fa7a3dd GtkStyleProvider: Add GtkStateFlags parameter to get_style_property().
Widget style properties can now have different values depending on the
current state.
2010-12-04 15:39:51 +01:00
46de2130d3 GtkWidget: unset NULL properties when overriding style. 2010-12-04 15:39:50 +01:00
e598f17871 Some header cleanups
Move GtkGradient to their own files, also move GtkBorder out of
gtkstyle.h, so that header can be all deprecated.
2010-12-04 15:39:47 +01:00
f8a874abb1 Initial attempt at deprecating GtkStyle api
This will probably need some finetuning.
2010-12-04 15:39:46 +01:00
11004ef61d Initialize all looping, active state transitions on map()
This allows widgets to gtk_widget_set_state_flags() before mapping
and have animations started anyway when this happens.
2010-12-04 15:39:44 +01:00
c6b2e47931 Let gtk_widget_get_path() correct early calls during init(). 2010-12-04 15:39:40 +01:00
d9664021cc GtkWidget: Update pango context from style context's font description. 2010-12-04 15:38:49 +01:00
1cfeeadc70 GtkWidget: Ensure the style context always has an screen.
Things like font settings depend on the screen, and widgets
like GtkTextView trigger queries on widgets without screen
when the parent window is being destroyed.
2010-12-04 15:38:48 +01:00
f383e6b0a2 GtkWidget: Add new set of methods to override style information.
gtk_widget_override_*() deprecates gtk_widget_modify_*(). There are
only functions to modify fg/bg/font/symbolic color, If anything more
fancy/complex is needed. There is the possibility of adding a
GtkStyleProvider yourself.
2010-12-04 15:38:36 +01:00
227294a6aa GtkWidget: Trigger state change transitions on state flags change.
This makes state transitions automatic for non-complex widgets, complex
widgets such as GtkTreeView still need to notify state updates themselves.
2010-12-04 15:38:33 +01:00
cd98204619 Implement widget states as a set of flags
gtk_widget_(set|unset|get)_state_flags() has been added, using GtkStateFlags
to represent the widget state. GtkStateType API has been implemented on top
of the new one.
2010-12-04 15:38:30 +01:00
1bdd761c3f GtkWidget: Ensure name changes involve a style context update. 2010-12-04 15:38:29 +01:00
a79626b7fb Add theming docs
Both API and file format is documented, there's still missing
a migration doc though.
2010-12-04 15:38:21 +01:00
a65d0d00c0 GtkWidget: Store GtkStyleContext in private struct. 2010-12-04 15:38:19 +01:00
88b78953b6 GtkContainer: Add method to get the GtkWidgetPath for a child.
This is now used throughout in order to have the full path for a given widget,
including intermediate named regions, the default implementation just returns
the GtkContainer's path copy, no intermediate regions between.
2010-12-04 15:38:19 +01:00
c575733eda GtkStyleContext: Fix animation framework to work with the new draw() semantics.
Invalidation region coalescing now happens recursively as draw() runs, and the
widget's x/y as now drawing coordinates are 0,0 based.
2010-12-04 15:38:18 +01:00
a07fe2c0e6 Add generic providers per-screen.
The providers are added as soon as gtk GtkSettings object for the screen
is created.
2010-12-04 15:38:15 +01:00
8dfa0e03ea GtkWidget: Set style context's screen before the widget_path.
This is so the style context has all necessary information before
triggering a style change on setting the path.
2010-12-04 15:38:14 +01:00
f239704094 GtkWidget: Add gtk_widget_reset_style().
This function is analogous to gtk_widget_reset_rc_styles(),
updates style recursively on a widget.
2010-12-04 15:38:13 +01:00
3c390c9c8e GtkWidget: Add the style-updated signal
This signal is emitted whenever the widget's style changes.
2010-12-04 15:38:13 +01:00
621a95f515 GtkSettings: implement GtkStyleProvider 2010-12-04 15:38:11 +01:00
0ce649e965 Plug a bunch of leaks. 2010-12-04 15:38:09 +01:00
3c07e3d3df GtkWidget: Update GtkStyleContext animation regions on allocation change. 2010-12-04 15:38:08 +01:00
27c91622f6 Set classes info in GtkWidgetPath. 2010-12-04 15:37:36 +01:00
a3637ec60d s/child class/region/ everywhere.
"Child class" is an invented term anyway, and it conceptually defines
identifiable regions in widgets.
2010-12-04 15:37:35 +01:00
978d97ea6f GtkWidget: Set style context direction. 2010-12-04 15:37:27 +01:00
e15dc89f89 GtkWidget: Add the default CSS provider to all style contexts. 2010-12-04 15:37:27 +01:00
9255e20bf8 GtkWidget: Create GtkStyle on top of GtkStyleContext. 2010-12-04 15:37:26 +01:00
6c549fecd3 GtkWidget: Construct style for partial widget hierarchies.
Some unparented widgets like to ask style details, so now the style is
constructed regardless of the parent being present or not, and then
reconstructed if the parent changes.
2010-12-04 15:37:25 +01:00
5db7197c27 GtkWidget: Set screen info in GtkStyleContext. 2010-12-04 15:37:18 +01:00
6c91ba1cc2 GtkWidget: Do not reset GtkStyleContext per get_style_context(). 2010-12-04 15:37:13 +01:00
22bae20ce8 GtkWidget: Hook up widget style property querying to style context. 2010-12-04 15:37:13 +01:00
327a9fc66a GtkWidget: Generate GtkWidgetPath on set_parent.
There's no need to wait for realize() to have the right widget style.
2010-12-04 15:37:11 +01:00
80e01becbe Fix compilation. 2010-12-04 15:37:10 +01:00
f5adc2a1c3 Add region details in gtk_widget_get_path(). 2010-12-04 15:37:09 +01:00
71949e05c4 Refurbish GtkWidgetPath API.
The foreach() function is now gone, there's now API to get
GTypes and names from the position in the path.
2010-12-04 15:37:07 +01:00
7dada9949d GtkWidget: Create GtkCssProvider for user modifications.
~/.gtk-X.0.css is checked, and added as a style resource if available.
2010-12-04 15:37:03 +01:00
fe4a6cea73 GtkWidget: Add widget path to style context. 2010-12-04 15:36:53 +01:00
9794b6adf9 GtkWidget: Add gtk_widget_get_path().
This function composes and returns a GtkWidgetPath representing
the passed widget.
2010-12-04 15:36:52 +01:00
3f93c714ae GtkWidget: Add gtk_widget_get_style_context().
There will be one GtkStyleContext per widget, at the moment its
lifetime is tied to the widget's, but it could be narrowed down
to GTK_WIDGET_REALIZED.
2010-12-04 15:36:51 +01:00
3494f87a10 API: Remove GdkNoExposeEvent
It's not used by anyone and not supported by any backend but X11.
2010-12-02 20:21:04 +01:00