diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-08-21 11:32:23 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-08-21 11:35:46 +0300 |
commit | 6e8a76c96a61d716c02aab4a7ca2ac40d2ae63ff (patch) | |
tree | 6690a0ea08b6b328b68ecf744f1468e2fc4acc24 | |
parent | f041d2f1163c36d9831b223d61e5740f43c00a13 (diff) |
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
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 5 |
1 files changed, 0 insertions, 5 deletions
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; } |