diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-12-12 22:28:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-12-12 22:29:54 +0400 |
commit | 51b9d85b091cbc31d73968f0652e59dd83247ca2 (patch) | |
tree | 8b8d343ba769fbb9e64093d13df7756a9f39fbf5 /source/blender/editors/interface | |
parent | e45a9a3aaa17f585160e1ac7cbab2eead793f84d (diff) |
UI: remove text margin when a slider is aligned to another button
Paint sliders had too much space on right (aligned with pressure icons)
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index a49f9b1a601..7369e0a2d79 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 */ |