From 60d471b2d00ce3a42e017a333fa4518429aacd93 Mon Sep 17 00:00:00 2001 From: Dieter Verfaillie Date: Wed, 7 Dec 2011 12:50:34 +0100 Subject: [PATCH] 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. --- modules/engines/ms-windows/msw_style.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/engines/ms-windows/msw_style.c b/modules/engines/ms-windows/msw_style.c index 7c352815b2..afd1a40328 100755 --- a/modules/engines/ms-windows/msw_style.c +++ b/modules/engines/ms-windows/msw_style.c @@ -2033,7 +2033,9 @@ draw_box (GtkStyle *style, } 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 ()) { @@ -2042,7 +2044,7 @@ draw_box (GtkStyle *style, widget, detail, x, y, width, height); } - if (is_vertical) + if (orientation == GTK_ORIENTATION_VERTICAL) { if (xp_theme_draw (window, XP_THEME_ELEMENT_SCALE_TROUGH_V,