diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-27 20:48:54 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-27 20:48:54 +0300 |
commit | d3b814e9ecb18d173a4ed0621c8f714b23c50082 (patch) | |
tree | 48a5537319a856fc40c81f4af24f1c6d0f65194d /source/blender/editors/interface/interface_templates.c | |
parent | 0e304ca8f57563c8f22313f6cee2551c88dcef3f (diff) |
UI: tweak status bar layout to make it less jumpy.
Keymap on the left, messages and jobs in the middle, stats on the right.
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 1f0cd5bbb42..041dc56cf92 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -4310,14 +4310,20 @@ void uiTemplateInputStatus(uiLayout *layout, struct bContext *C) /* Otherwise should cursor keymap status. */ for (int i = 0; i < 3; i++) { uiLayout *box = uiLayoutRow(layout, true); - for (int j = 0; j < 2; j++) { - const char *msg = WM_window_cursor_keymap_status_get(win, i, j); - if ((j == 0) || (msg != NULL)) { - uiItemL(box, msg, j == 0 ? (ICON_MOUSE_LMB + i) : ICON_MOUSE_DRAG); + + const char *msg = WM_window_cursor_keymap_status_get(win, i, 0); + const char *msg_drag = WM_window_cursor_keymap_status_get(win, i, 1); + + if (msg || msg_drag) { + uiItemL(box, msg ? msg : "", (ICON_MOUSE_LMB + i)); + + if (msg_drag) { + uiItemL(box, msg_drag, ICON_MOUSE_DRAG); + } + + if (i != 2) { + uiItemS(layout); } - } - if (i != 2) { - uiItemSpacer(layout); } } } |