Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2019-08-21 11:32:23 +0300
committerJulian Eisel <eiseljulian@gmail.com>2019-08-21 11:35:46 +0300
commit6e8a76c96a61d716c02aab4a7ca2ac40d2ae63ff (patch)
tree6690a0ea08b6b328b68ecf744f1468e2fc4acc24 /source
parentf041d2f1163c36d9831b223d61e5740f43c00a13 (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
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_layout.c5
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;
}