UI: change to give sliders more text space, messes with alignment
authorCampbell Barton <ideasman42@gmail.com>
Tue, 11 Feb 2014 15:34:48 +0000 (02:34 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 11 Feb 2014 15:46:43 +0000 (02:46 +1100)
source/blender/editors/interface/interface_widgets.c

index 759e40a784573205420b942a43b3d80be9ca5f94..e9b658aa9aa9e5de79d699c9c9dfedb5672bd214 100644 (file)
@@ -2734,12 +2734,11 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s
        wtb.outline = 1;
        wtb.inner = 0;
        widgetbase_draw(&wtb, wcol);
-       
-       /* text space */
-       if ((roundboxalign & UI_CNR_TOP_LEFT) || (roundboxalign & UI_CNR_BOTTOM_LEFT))
-               rect->xmin += toffs;
-       if ((roundboxalign & UI_CNR_TOP_RIGHT) || (roundboxalign & UI_CNR_BOTTOM_RIGHT))
-               rect->xmax -= toffs;
+
+       /* add space at either side of the button so text aligns with numbuttons (which have arrow icons) */
+       rect->xmax -= toffs;
+       rect->xmin += toffs;
+
 }
 
 /* I think 3 is sufficient border to indicate keyed status */