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).
This commit is contained in:
Julian Eisel 2020-11-04 22:09:44 +01:00
parent f9fbe4efd6
commit 7ee518cf70

@ -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) {