[Bf-blender-cvs] [51b9d85] master: UI: remove text margin when a slider is aligned to another button
Campbell Barton
noreply at git.blender.org
Thu Dec 12 19:32:17 CET 2013
Commit: 51b9d85b091cbc31d73968f0652e59dd83247ca2
Author: Campbell Barton
Date: Fri Dec 13 05:28:24 2013 +1100
http://developer.blender.org/rB51b9d85b091cbc31d73968f0652e59dd83247ca2
UI: remove text margin when a slider is aligned to another button
Paint sliders had too much space on right (aligned with pressure icons)
===================================================================
M source/blender/editors/interface/interface_widgets.c
===================================================================
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index a49f9b1..7369e0a 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -2631,8 +2631,10 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s
widgetbase_draw(&wtb, wcol);
/* text space */
- rect->xmin += toffs;
- rect->xmax -= toffs;
+ 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;
}
/* I think 3 is sufficient border to indicate keyed status */
More information about the Bf-blender-cvs
mailing list