From 7ee518cf705fcebee2d110bfbb6bf00a0f170efb Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 4 Nov 2020 22:09:44 +0100 Subject: [PATCH] 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). --- source/blender/editors/interface/interface.c | 5 +++++ 1 file changed, 5 insertions(+) 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) {