Commit Graph

1288 Commits

Author SHA1 Message Date
9d8682b9ac Fix a few parameter name mismatches 2010-12-17 14:46:18 -05:00
b792a31995 widgetpath: allow GTypes non-derived from GTK_TYPE_WIDGET
This makes things like GtkCellRenderer or GtkNumerableIcon more easily
themeable.

https://bugzilla.gnome.org/show_bug.cgi?id=637169
2010-12-17 18:30:57 +01:00
2c8c1c6df4 Remove *_set_extension_events() and old API to query devices.
The old functions to get core pointer and devices list are gone as
well. This slice is entirely replaced internally by multidevice
handling and may just go.
2010-12-17 16:25:14 +01:00
b7fd6f1e88 Remove gtk_widget_reset_shapes
See bug 637155.
2010-12-14 22:15:33 -05:00
f9ed6baeb4 Improve docs for gtk_widget_reset_style().
Document that it may be needed in containers when
children are reordered.
2010-12-15 03:33:01 +01:00
99f59d8266 Fix coalescing of state animation areas for multiple window widgets.
Coordinates needed to be translated relative to the window position
in within the widget.
2010-12-13 22:31:27 +01:00
5ac194c2d7 Some doc additions 2010-12-07 09:55:30 -05:00
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
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