Matthias Clasen
5ac194c2d7
Some doc additions
2010-12-07 09:55:30 -05:00
Tristan Van Berkom
fc5cabba90
Added minimum size parameter to GtkWidgetClass->adjust_size_allocation.
...
This allows us to add a check before executing
->get_preferred_height_for_width() to ensure we always
request for at least the minimum required size (and lets
us remove the warning in gtkcontainer.c telling implementors
to do this check manually from thier container implementations).
2010-12-07 23:47:40 +09:00
Paolo Borelli
561346bd40
Remove unused function modify_color_property
2010-12-05 22:07:30 +01:00
Carlos Garnacho
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
Matthias Clasen
d5df33c75f
Fix abi check after recent merges
2010-12-05 12:18:30 -05:00
Carlos Garnacho
37719380ae
Fix call to gtk_widget_override_cursor()
2010-12-04 18:26:34 +01:00
Carlos Garnacho
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
Carlos Garcia Campos
07eeae1582
GtkWidget: add gtk_widget_render_icon_pixbuf()
...
and deprecate gtk_widget_render_icon()
2010-12-04 15:39:57 +01:00
Carlos Garcia Campos
15d997d58a
GtkWidget: queue a resize when style context changed
2010-12-04 15:39:56 +01:00
Carlos Garnacho
9aca6c8071
GtkWidget: Add gtk_widget_override_cursor().
...
This function replaces gtk_widget_modify_cursor().
2010-12-04 15:39:54 +01:00
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
46de2130d3
GtkWidget: unset NULL properties when overriding style.
2010-12-04 15:39:50 +01:00
Matthias Clasen
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
Matthias Clasen
f8a874abb1
Initial attempt at deprecating GtkStyle api
...
This will probably need some finetuning.
2010-12-04 15:39:46 +01:00
Carlos Garnacho
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
Carlos Garnacho
c6b2e47931
Let gtk_widget_get_path() correct early calls during init().
2010-12-04 15:39:40 +01:00
Carlos Garnacho
d9664021cc
GtkWidget: Update pango context from style context's font description.
2010-12-04 15:38:49 +01:00
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
1bdd761c3f
GtkWidget: Ensure name changes involve a style context update.
2010-12-04 15:38:29 +01:00
Carlos Garnacho
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
Carlos Garnacho
a65d0d00c0
GtkWidget: Store GtkStyleContext in private struct.
2010-12-04 15:38:19 +01:00
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
621a95f515
GtkSettings: implement GtkStyleProvider
2010-12-04 15:38:11 +01:00
Carlos Garnacho
0ce649e965
Plug a bunch of leaks.
2010-12-04 15:38:09 +01:00
Carlos Garnacho
3c07e3d3df
GtkWidget: Update GtkStyleContext animation regions on allocation change.
2010-12-04 15:38:08 +01:00
Carlos Garnacho
27c91622f6
Set classes info in GtkWidgetPath.
2010-12-04 15:37:36 +01:00
Carlos Garnacho
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
Carlos Garnacho
978d97ea6f
GtkWidget: Set style context direction.
2010-12-04 15:37:27 +01:00
Carlos Garnacho
e15dc89f89
GtkWidget: Add the default CSS provider to all style contexts.
2010-12-04 15:37:27 +01:00
Carlos Garnacho
9255e20bf8
GtkWidget: Create GtkStyle on top of GtkStyleContext.
2010-12-04 15:37:26 +01:00
Carlos Garnacho
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
Carlos Garnacho
5db7197c27
GtkWidget: Set screen info in GtkStyleContext.
2010-12-04 15:37:18 +01:00
Carlos Garnacho
6c91ba1cc2
GtkWidget: Do not reset GtkStyleContext per get_style_context().
2010-12-04 15:37:13 +01:00
Carlos Garnacho
22bae20ce8
GtkWidget: Hook up widget style property querying to style context.
2010-12-04 15:37:13 +01:00
Carlos Garnacho
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
Carlos Garnacho
80e01becbe
Fix compilation.
2010-12-04 15:37:10 +01:00
Carlos Garnacho
f5adc2a1c3
Add region details in gtk_widget_get_path().
2010-12-04 15:37:09 +01:00
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
fe4a6cea73
GtkWidget: Add widget path to style context.
2010-12-04 15:36:53 +01:00
Carlos Garnacho
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