Matthias Clasen
7629ee7ad0
GtkStyleContextPrivate: Improve struct packing
2011-04-12 12:45:51 -04:00
Benjamin Otte
3f491f7157
style: Move private function into private header
...
The function wasn't exported, so everybody using it would have gotten
linking failures.
2011-03-17 11:59:17 +01:00
Ignacio Casal Quinteiro
0a03e81224
Fix conversion from GdkColor to GdkRGBA
2011-03-06 11:17:06 +01:00
Matthias Clasen
9707d8a3e6
Don't assert on zero width/height in render functions
...
We can just silently ignore those rendering calls.
https://bugzilla.gnome.org/show_bug.cgi?id=643041
2011-02-28 07:52:59 -05:00
Murray Cumming
8d54fa7102
More tiny documentation typo fixes.
2011-02-23 11:09:20 +01:00
Matthias Clasen
f04504ac94
Allow custom icon size in gtk_render_icon_pixbuf()
...
Pointed out in bug 642213.
2011-02-14 13:22:28 -05:00
Benjamin Otte
ccc3679a62
stylecontext: Use the common approach for priate pointers
...
Has two advantages:
1) consistency
2) "print *context->priv" actually works in gdb
2011-02-11 23:21:11 +01:00
Carlos Garnacho
15fdf90265
doc: Add a note about prioritization of GtkStyleProviders
...
It was unclear in the docs what happened if
gtk_style_context_add_provider() and
gtk_style_context_add_provider_for_screen()
were used with the same priority.
2011-02-08 04:17:56 +01:00
Matthias Clasen
208974636f
Set the correct initial value for the direction property
2011-02-07 20:36:46 -05:00
Carlos Garnacho
2be692687f
Fix color style properties lookup when the color resolution fails
...
The cached GValue ended up with a GtkSymbolicColor type, so
the contained value was bogus. Noticed by Mitch.
2011-02-07 19:56:17 +01:00
Carlos Garnacho
217d3fd796
GtkStyleContext is meant to have a GdkScreen
...
It is used to get the default providers, without them
the style context can't do much. A check for NULL screen
is done before any sensitive call to
gtk_style_context_set_screen(), in the hope that any widget
will open the display before doing anything related to
styling. Fixes bug #641429 , reported by Bastien Nocera.
2011-02-06 11:21:42 +01:00
Matthias Clasen
4dc9b294d8
Don't assume a screen exists before realize()
...
Fix for https://bugzilla.gnome.org/show_bug.cgi?id=641429
2011-02-04 22:03:11 -05:00
Paolo Borelli
001697a22a
Move the get_cursor_color in GtkStyleContext
...
Move the private get_cursor_color method belongs to StyleContext. Change
the api so that retrieving both primary and secondary color is possible.
I left the method private for now, though it should probably be public
as all the other getters.
2011-01-29 13:13:42 +01:00
Matthias Clasen
d9fcc4c630
Silence new gcc warnings
...
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 21:51:38 -05:00
Matthias Clasen
a12dad75a2
Split out private style context api into a private header
2011-01-23 18:29:28 -05:00
Pavel Holejsovsky
2f0d40335b
[GI] Add missing (transfer) annotations
2011-01-20 13:57:18 +01:00
Pavel Holejsovsky
3c8fc21e9b
[GI] Fixes of existing incorrect annotations
2011-01-20 13:56:06 +01:00
Carlos Garnacho
0b7496558d
Make GtkCssProvider deal with widget types not being in plain CamelCase
...
Fixes bug #Bug 639754, reported by Kjell Ahlstedt. gtkmm doesn't
use plain CamelCase for its widget type names, so in order to
distinguish widget type names from regions in the CSS parser,
the following checks are now done:
* if it contains an uppercase letter -> widget class (that should
also work for gtkmm)
* if it's a string compound by lowercase letters and '-' -> it's
a region, checks have been added in gtk_style_context_add_region()
and gtk_widget_path_iter_add_region() to ensure this.
2011-01-19 04:28:49 +01:00
Carlos Garnacho
f482d4dc89
Ensure harder a GtkStyleContext has a theming engine anytime
2011-01-17 04:43:42 +01:00
Matthias Clasen
867dc0bd0d
Avoid a critical warning during tab DND
...
https://bugzilla.gnome.org/show_bug.cgi?id=639380
2011-01-14 21:15:06 -05:00
Benjamin Otte
2b0b08a861
stylecontext: Protect the cairo contexts with cairo_save/cairo_restore()
...
We don't want theme engines to mess up the context we are currently
drawing with.
2011-01-12 11:40:09 +01:00
Milan Bouchet-Valat
44da5a0094
Improve docs about GtkStyleContext padding/border/margin
...
GTK_STYLE_PROPERTY_BORDER_WIDTH is of style GtkBorder, not gint.
Also make it clearer what the definition and ordering of these 3
properties is. Reorder them in the header to be more logical.
2011-01-11 12:28:54 +01:00
Carlos Garnacho
d5b0ccacce
GtkStyleContext: Do not cancel possibly unstarted transitions
...
It might happen that this overcautious check is done on an animation
that didn't have time to gather invalidation rectangles.
2011-01-10 23:52:21 +01:00
Carlos Garnacho
de36dda925
Add gtk_style_context_scroll_animations()
...
This function will be needed in widgets like GtkTreeView,
since gdk_window_scroll() doesn't trigger the usual
mechanisms to update the invalidation area, this function
is needed together with it.
2011-01-10 20:49:41 +01:00
Carlos Garnacho
e6277d3b82
Add gtk_style_context_cancel_animations()
...
This function takes a region ID and cancels all animations
on or beneath that region (as in push/pop_animatable_region).
First user of this is GtkWidget itself, so unmapped widgets
have looping animations cancelled. Fixes bug #638119 , reported
by Jesse van den Kieboom.
2011-01-10 03:50:01 +01:00
Carlos Garnacho
2bd221d215
Bug 637910 - GtkSpinner - does not animate
...
Fix widget-to-window coordinates translation in the
style context animation code.
2010-12-24 19:37:49 +01:00
Carlos Garnacho
ac0353e08a
Make gtk_style_context_get_* functions more robust
...
Even if the default CSS contains values for these, handle non-existing
values as queries might happen on an incomplete style.
2010-12-21 14:44:49 +01:00
Cosimo Cecchi
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
Diego Escalante Urrelo
02f92f29d5
gtkstylecontext: fix typos in annotations
...
Fixes Bug #637256
2010-12-15 00:46:25 +00:00
Carlos Garnacho
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
Paolo Borelli
f285a84bd6
Add convenience function for the font description.
2010-12-13 22:31:27 +01:00
Benjamin Otte
3070d6e3d5
Revert "docs: Reinstate pixbufs section in GDK docs"
...
I committed my whole working tee instead of just one file. Ooops.
This reverts commit ded14b2562
.
2010-12-09 23:55:33 +01:00
Benjamin Otte
ded14b2562
docs: Reinstate pixbufs section in GDK docs
...
It was accidentally removed in 0775b0a858
2010-12-09 11:14:21 +01:00
Carlos Garnacho
4cca7554b8
GtkStyleContext: warn on meaningless coords in gtk_render_* calls
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 Garcia Campos
f261d56da3
GtkStyleContext: invalidate icon caches when resetting widgets
2010-12-04 15:39:56 +01:00
Carlos Garnacho
bacb7906f2
Add helper API for getting colors/borders in GtkStyleContext/GtkThemingEngine
2010-12-04 15:39:55 +01:00
Carlos Garnacho
066f35bf28
Parse user CSS from $XDG_CONFIG_HOME/gtk-3.0/gtk.css
2010-12-04 15:39:53 +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
2ca905db5e
GtkStyleContext: Handle directionality when picking next provider.
2010-12-04 15:39:50 +01:00
Carlos Garcia Campos
4aaf193602
docs: gtk_style_context_get_screen() always returns a valid screen
2010-12-04 15:39:49 +01:00
Carlos Garcia Campos
7a5a622998
Check screen really changed before notifying it and invalidating the context
2010-12-04 15:39:49 +01:00
Carlos Garcia Campos
7abf76fbc1
Initialize screen of GtkStyleContext to default screen
2010-12-04 15:39:48 +01:00
Matthias Clasen
ca143b1303
Add list of classes and regions to the docs
2010-12-04 15:39:48 +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
Carlos Garnacho
62e9188ff3
GtkStyleContext: store layout extents for animation purposes.
2010-12-04 15:39:43 +01:00
Carlos Garnacho
818aca5aee
GtkStyleContext: Only allow looping transitions for states being turned on.
2010-12-04 15:39:43 +01:00
Carlos Garnacho
ad6da0cdb8
GtkStyleContext: Stop animations if the window is gone.
2010-12-04 15:39:43 +01:00
Matthias Clasen
0f98b15090
Add illustration to gtk_render_handle docs
2010-12-04 15:39:42 +01:00
Matthias Clasen
3ddee2561b
Small doc addition
2010-12-04 15:39:42 +01:00