Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-12-12 22:28:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-12 22:29:54 +0400
commit51b9d85b091cbc31d73968f0652e59dd83247ca2 (patch)
tree8b8d343ba769fbb9e64093d13df7756a9f39fbf5 /source/blender/editors/interface
parente45a9a3aaa17f585160e1ac7cbab2eead793f84d (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.c6
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 */