Commit: 6e8a76c96a61d716c02aab4a7ca2ac40d2ae63ff Author: Julian Eisel Date: Wed Aug 21 10:32:23 2019 +0200 Branches: master https://developer.blender.org/rB6e8a76c96a61d716c02aab4a7ca2ac40d2ae63ff
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 =================================================================== M source/blender/editors/interface/interface_layout.c =================================================================== diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 78eed98eb77..e9b9411e1bd 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -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; } _______________________________________________ Bf-blender-cvs mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-blender-cvs
