[gtk+/gtk-2-24] scale: backport orientation fix for vertical scales
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] scale: backport orientation fix for vertical scales
- Date: Mon, 9 Jan 2012 17:39:37 +0000 (UTC)
commit 03fae9086f8888829563f719d9435177964a5719
Author: Stefan Sauer <ensonic users sf net>
Date: Mon Jan 9 18:39:13 2012 +0100
scale: backport orientation fix for vertical scales
gtk/gtkscale.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 955c3c0..42d1788 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -945,8 +945,11 @@ find_next_pos (GtkWidget *widget,
if (match == (mark->position == pos))
return marks[i];
}
-
- return widget->allocation.width;
+
+ if (GTK_RANGE(widget)->orientation == GTK_ORIENTATION_HORIZONTAL)
+ return widget->allocation.width;
+ else
+ return widget->allocation.height;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]