diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-27 22:06:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-27 22:08:50 +0300 |
commit | fd2c48726fd27ff1335c4adbe251fb1e076d8266 (patch) | |
tree | cd663034b7b6b52c564f13eb039020d23fd58f42 /source/blender/editors/interface/interface.c | |
parent | 38cb29d67e5947f99824987dcd567a82cfd51646 (diff) |
UI: center align number buttons w/o text
This makes supporting split properties and text possible, see T54951
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 1d798c7baad..20ad6f00c5b 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -3238,7 +3238,9 @@ static uiBut *ui_def_but( } #ifdef USE_NUMBUTS_LR_ALIGN else if (ELEM(but->type, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER)) { - but->drawflag |= UI_BUT_TEXT_LEFT; + if (slen != 0) { + but->drawflag |= UI_BUT_TEXT_LEFT; + } } #endif |