win32: Fix vertical GtkVolumeButton widget rendering.

The trough was being rendered horizontal for vertical
GtkVolumeButton widgets. Not relying on GTK_IS_VSCALE
but using the orientable interface instead fixes this.
This commit is contained in:
Dieter Verfaillie 2011-12-07 12:50:34 +01:00
parent af309a50af
commit 60d471b2d0

View File

@ -2033,7 +2033,9 @@ draw_box (GtkStyle *style,
} }
else if (widget && GTK_IS_SCALE (widget)) else if (widget && GTK_IS_SCALE (widget))
{ {
gboolean is_vertical = GTK_IS_VSCALE (widget); GtkOrientation orientation;
orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (widget));
if (!xp_theme_is_active ()) if (!xp_theme_is_active ())
{ {
@ -2042,7 +2044,7 @@ draw_box (GtkStyle *style,
widget, detail, x, y, width, height); widget, detail, x, y, width, height);
} }
if (is_vertical) if (orientation == GTK_ORIENTATION_VERTICAL)
{ {
if (xp_theme_draw if (xp_theme_draw
(window, XP_THEME_ELEMENT_SCALE_TROUGH_V, (window, XP_THEME_ELEMENT_SCALE_TROUGH_V,