[gtk+] scale: Fix value height calculation



commit 985121813e2af706837e2e4d14019dec07762975
Author: Timm Bäder <mail baedert org>
Date:   Wed Mar 16 10:20:17 2016 +0100

    scale: Fix value height calculation
    
    if (orientation) doesn't make a lot of sense but C doesn't complain and
    instead evaluates orientation to TRUE for GTK_ORIENTATION_VERTICAL
    (since that's 1), thus inverting the value sizes.

 gtk/gtkscale.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 9fe1baf..ec5804d 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -1212,7 +1212,7 @@ gtk_scale_measure_value (GtkCssGadget   *gadget,
       g_object_unref (layout);
     }
 
-  if (orientation)
+  if (orientation == GTK_ORIENTATION_HORIZONTAL)
     *minimum = *natural = width;
   else
     *minimum = *natural = height;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]