Carlos Garnacho
7a623988e5
Fix leak in GtkStyle.
2010-12-28 19:06:46 +01:00
Tristan Van Berkom
05254766c7
Avoid rendering frames when shadow type argument is GTK_SHADOW_NONE in
...
gtk_paint_* functions.
2010-12-28 23:15:39 +09:00
Matthias Clasen
55ca24d1d4
Drop GtkThemeEngine
...
It is not used anymore.
2010-12-23 22:16:50 -05:00
Owen W. Taylor
a2dddb1da0
Return an appropriate GtkStyle from gtk_rc_get_style_by_paths()
...
Always returning NULL (no match) from gtk_rc_get_style_by_paths()
means that looking up colors and style properties based on the
GtkStyle will give default values instead of themed values. We can
do better by returning a GtkStyle based on a GtkWidgetPath that we
figure out from the values passed in to get_style_by_paths().
https://bugzilla.gnome.org/show_bug.cgi?id=637520
2010-12-21 14:27:25 -05:00
Carlos Garnacho
33cd32f796
Make gtk_style_new() use a backing GtkStyleContext
...
Fixes a bug in mutter where it would resort to a dummy style
to get iconview rubberband color.
Reported by Mathieu Bridon in
https://bugzilla.gnome.org/show_bug.cgi?id=637520
2010-12-20 17:18:35 +01:00
Carlos Garnacho
56c3d4b1be
Remove dead Gtk[Rc]Style code
...
Most code in gtkrc.c has been turned into a no-op, but that one
reverting in public API (gtk_rc_scanner_new() and such). GtStyle
is also more shallow, now fully relies in the backing
GtkStyleContext and all connection to gtkrc.c has been removed.
GtkBinding has been also affected, there is no replacement yet
for custom keybindings in style files, so that piece of code that
hooked into gtkrc has been replaced by a FIXME so in the future
it may be added back.
2010-12-18 12:10:00 +01:00
Matthias Clasen
5627ba161e
More parameter name mismatches
2010-12-17 14:49:27 -05:00
Benjamin Otte
6d6ee9a26a
style: Remove unused code
2010-12-06 01:02:52 +01:00
Carlos Garcia Campos
b75972d0ce
GtkStyle: set style context state before calling gtk_render_icon_pixbuf()
2010-12-04 15:39:56 +01:00
Carlos Garcia Campos
ca59b042df
GtkStyle: make context property readable
2010-12-04 15:39:56 +01:00
Carlos Garnacho
4c1a2426d4
GtkStyle: Commit a few typos when translating states.
2010-12-04 15:39:49 +01:00
Matthias Clasen
5adfe6029d
Don't add class "scrollbar" for every trough
...
Turns out "trough" as a detail string is used in a variety
of widgets, not all of which are scrollbars.
2010-12-04 15:39:47 +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
1915a19503
Add deprecation notes
2010-12-04 15:39:46 +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
e47c8e2490
GtkStyle: Return the default icon set if no context is attached.
2010-12-04 15:39:39 +01:00
Carlos Garnacho
5d496aa7f3
GtkStyle: Do not warn if attach count == 0
...
This is going go happen more and more often now, as realize handlers start
removing the gtk_widget_style_attach() calls.
2010-12-04 15:39:39 +01:00
Matthias Clasen
d9b0da5b83
Fix resize grip drawing
...
There was some confusion about junctions...
2010-12-04 15:39:34 +01:00
Matthias Clasen
fc10599ac8
Make unfocused selections visible in entries
2010-12-04 15:39:33 +01:00
Matthias Clasen
21a193ad02
Make expanders prelight
2010-12-04 15:39:33 +01:00
Carlos Garnacho
0c1cfd8a34
GtkStyle: handle scales when translating the detail string.
2010-12-04 15:39:24 +01:00
Carlos Garnacho
0df9c70200
Use gtk_render_activity() when rendering progressbars through GtkStyle
2010-12-04 15:39:23 +01:00
Carlos Garnacho
bc3c9ce619
GtkStyle: Fix typo.
...
GtkStateType was being used in gtk_style_context_get(), instead of
GtkStateFlags, oops.
2010-12-04 15:39:20 +01:00
Matthias Clasen
c8e5d3b07b
Transform the 'menu' detail string to the 'popup' class
2010-12-04 15:39:15 +01:00
Matthias Clasen
69f91fed94
Translate detail strings for radio buttons
2010-12-04 15:39:14 +01:00
Carlos Garnacho
13e186bbca
Handle menuitem detail string better.
2010-12-04 15:39:13 +01:00
Matthias Clasen
eb8a1c4e33
Don't whine about expander-style missing
...
This check was lost in the GtkStyleContext porting.
2010-12-04 15:39:12 +01:00
Carlos Garnacho
60a2e90df7
GtkStyle: transform tabs' detail string.
2010-12-04 15:39:10 +01:00
Carlos Garnacho
99879d4a5f
GtkStyle: translate a few more detail strings.
2010-12-04 15:38:48 +01:00
Carlos Garnacho
d321713704
GtkStyle: transform window background detail string.
2010-12-04 15:38:44 +01:00
Carlos Garnacho
1ec47b20db
GtkStyle: Transform menubar detail string.
2010-12-04 15:38:43 +01:00
Carlos Garnacho
46b8cc8686
GtkStyle: Transform menu accelerators string
2010-12-04 15:38:42 +01:00
Carlos Garnacho
a23863211b
GtkStyleContext: Add gtk_render_icon_pixbuf()
...
This function is similar to gtk_style_render_icon(), which is now
implemented on top of this one.
2010-12-04 15:38:38 +01:00
Carlos Garnacho
920637abef
GtkStyle: Listen to context changes.
...
This way the GtkStyle is updated to the latest style info, actually
emitting ::style-set must be performed after invalidating the style
context.
2010-12-04 15:38:36 +01:00
Carlos Garnacho
af1f8701dc
GtkThemingEngine: draw resize grip through render_handle().
...
GtkJunctionSides is used instead of GdkWindowEdge, GtkStyle
implementation has changed to use GtkStyleContext's.
2010-12-04 15:38:33 +01:00
Carlos Garnacho
8ea649e0a0
Rely only on fg/bg colors.
...
"foreground-color" has been renamed to just "color" as in regular CSS,
and the "text-color" and "base-color" properties have been removed. The
default CSS has been changed to have widgets cope with this change.
2010-12-04 15:38:29 +01:00
Carlos Garnacho
5310ad8070
GtkStyle: Get to style GtkCellRendererText text.
2010-12-04 15:38:27 +01:00
Carlos Garnacho
d565e15951
GtkStyle: translate active state in paint_flat_box().
2010-12-04 15:38:27 +01:00
Carlos Garnacho
6bd0865601
GtkStyle: Handle scrollbar buttons.
2010-12-04 15:38:25 +01:00
Carlos Garnacho
3bfc59b9bb
GtkStyle: Match "trough" and "slider" detail strings.
...
This is so scrollbars can be themed throught the "trough" and
"slider" classes.
2010-12-04 15:38:25 +01:00
Carlos Garnacho
4e02218f52
Use GdkRGBA all around in GtkStyleContext.
2010-12-04 15:38:25 +01:00
Carlos Garnacho
c9a3da5025
GtkStyleContext: s/set/add/ and s/unset/remove/ for classes/regions.
...
Several classes and regions may be set to GtkStyleContext, so rename
the functions to be more intuitive.
2010-12-04 15:38:24 +01:00
Carlos Garnacho
59b0fa8133
Remove GtkOrientation parameter from gtk_render_handle().
...
The case for paned can be guessed out from the height and width,
for handlebox the orientation parameter doesn't make much sense,
and this way it could also be used for resize grips.
2010-12-04 15:38:21 +01:00
Carlos Garnacho
77ccdfc94e
GtkStyle: Protect against padding being NULL
2010-12-04 15:38:13 +01:00
Carlos Garnacho
58a51bca97
GtkStyle: Fill in x/ythickness and font_desc from the style context.
2010-12-04 15:38:11 +01:00
Carlos Garnacho
846f67d805
GtkStyle: Allow GTK_ARROW_NONE.
2010-12-04 15:38:10 +01:00
Carlos Garnacho
0ce649e965
Plug a bunch of leaks.
2010-12-04 15:38:09 +01:00
Carlos Garnacho
11ac0cb3e1
GtkStyle: set the active flag depending on shadow_type in draw_box().
2010-12-04 15:37:37 +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
dd8da82d1e
GtkStyle: set junction details in spinbutton buttons.
2010-12-04 15:37:32 +01:00