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 /release/scripts/startup/bl_ui/space_statusbar.py | |
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 'release/scripts/startup/bl_ui/space_statusbar.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_statusbar.py | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/release/scripts/startup/bl_ui/space_statusbar.py b/release/scripts/startup/bl_ui/space_statusbar.py index b0cfe424d3e..dbcfbf165ce 100644 --- a/release/scripts/startup/bl_ui/space_statusbar.py +++ b/release/scripts/startup/bl_ui/space_statusbar.py @@ -25,34 +25,14 @@ class STATUSBAR_HT_header(Header): bl_space_type = 'STATUSBAR' def draw(self, context): - area = context.area - region = context.region - - if region.alignment == 'RIGHT': - if region == area.regions[0]: - self.draw_right(context) - else: - self.draw_center(context) - else: - self.draw_left(context) - - def draw_left(self, context): layout = self.layout + # input status layout.template_input_status() - def draw_center(self, context): - layout = self.layout + layout.separator_spacer() - scene = context.scene - view_layer = context.view_layer - - layout.label(text=scene.statistics(view_layer), translate=False) - - def draw_right(self, context): - layout = self.layout - - layout.template_running_jobs() + # messages layout.template_reports_banner() row = layout.row(align=True) @@ -66,7 +46,16 @@ class STATUSBAR_HT_header(Header): # include last so text doesn't push buttons out of the header row.label(bpy.app.autoexec_fail_message) - return + + layout.template_running_jobs() + + layout.separator_spacer() + + # stats + scene = context.scene + view_layer = context.view_layer + + layout.label(text=scene.statistics(view_layer), translate=False) classes = ( |