UI: Don't left align operator buttons in toolbars
This hack would make operator (push down) buttons without icons align their text to the left in toolbars. Everywhere else in Blender, we center it by default. We barely use operator buttons in toolbars anymore. Even if we do and there's a good reason to make text left aligned, it's better to use `uiLayout.alignment = 'LEFT'` to achieve the same effect, but without lowish-level hacks for a specific region type. Differential Revision: https://developer.blender.org/D5527
This commit is contained in:
parent
f041d2f116
commit
6e8a76c96a
|
@ -1180,11 +1180,6 @@ static uiBut *uiItemFullO_ptr_ex(uiLayout *layout,
|
|||
|
||||
assert(but->optype != NULL);
|
||||
|
||||
/* text alignment for toolbar buttons */
|
||||
if ((layout->root->type == UI_LAYOUT_TOOLBAR) && !icon) {
|
||||
but->drawflag |= UI_BUT_TEXT_LEFT;
|
||||
}
|
||||
|
||||
if (flag & UI_ITEM_R_NO_BG) {
|
||||
layout->emboss = prev_emboss;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue