diff options
author | Julian Eisel <julian@blender.org> | 2020-11-05 00:09:44 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-11-05 00:32:26 +0300 |
commit | 7ee518cf705fcebee2d110bfbb6bf00a0f170efb (patch) | |
tree | 18bae5b21f138ed19d577414270daa798f0caebf /source | |
parent | f9fbe4efd67e364940c5813d4201dcf1a26c65af (diff) |
Fix T80313: Fix clipped text in splash screen on hiDPI monitors
The current layout gave too little space for the full "Search" string inside
the button.
Fix this by making sure radio-buttons have their text center aligned by default
in pop-ups too, like they do anywhere else.
This does affect a few other cases, e.g. the "RGB"/"HSV"/"Hex" radio-toggles
for color pickers. But this should be fine, I don't think they were ever
intentionally using left-aligned text (while similar buttons outside of pop-ups
didn't).
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index d2f9b31cecd..c4422c1068f 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -4069,6 +4069,11 @@ static uiBut *ui_def_but(uiBlock *block, } #endif + /* Always keep text in radio-buttons (expanded enums) center aligned. */ + if (ELEM(but->type, UI_BTYPE_ROW)) { + but->drawflag &= ~UI_BUT_TEXT_LEFT; + } + but->drawflag |= (block->flag & UI_BUT_ALIGN); if (block->lock == true) { |