UI: remove text margin when a slider is aligned to another button

Paint sliders had too much space on right (aligned with pressure icons)
This commit is contained in:
Campbell Barton 2013-12-13 05:28:24 +11:00
parent e45a9a3aaa
commit 51b9d85b09
Notes: blender-bot 2023-02-14 13:47:32 +01:00
Referenced by issue #30975, Image Layer for Blender
1 changed files with 4 additions and 2 deletions

View File

@ -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 */