[Bf-blender-cvs] [7ee518cf705] master: Fix T80313: Fix clipped text in splash screen on hiDPI monitors

Julian Eisel noreply at git.blender.org
Wed Nov 4 22:32:45 CET 2020


Commit: 7ee518cf705fcebee2d110bfbb6bf00a0f170efb
Author: Julian Eisel
Date:   Wed Nov 4 22:09:44 2020 +0100
Branches: master
https://developer.blender.org/rB7ee518cf705fcebee2d110bfbb6bf00a0f170efb

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).

===================================================================

M	source/blender/editors/interface/interface.c

===================================================================

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



More information about the Bf-blender-cvs mailing list