diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-09-28 07:44:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-09-29 13:03:47 +0300 |
commit | 4cf4bb2664ebe145dac9715bbbfcc2b96f5ff175 (patch) | |
tree | c653b44f7decc251c9caaf15d65674a47ce3e6c1 /release/scripts/startup/bl_ui/space_toolsystem_common.py | |
parent | eabb1348409012547b1220a80c08163d7c29afaa (diff) |
UI: swap tool and regular header
Swap the tool-header and header order so the tool-header
so the header is always next to the window edge.
Note that files saved in 3.0 will have overlapping headers when opened
in any version of Blender before this commit.
Reviewed By: Severin, fsiddi
Maniphest Tasks: T91536
Ref D12631
Diffstat (limited to 'release/scripts/startup/bl_ui/space_toolsystem_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_common.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index 98e29d3baba..4a598d0aa63 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -190,7 +190,7 @@ class ToolActivePanelHelper: ToolSelectPanelHelper.draw_active_tool_header( context, layout.column(), - show_tool_name=True, + show_tool_icon=True, tool_key=ToolSelectPanelHelper._tool_key_from_context(context, space_type=self.bl_space_type), ) @@ -766,7 +766,7 @@ class ToolSelectPanelHelper: def draw_active_tool_header( context, layout, *, - show_tool_name=False, + show_tool_icon=False, tool_key=None, ): if tool_key is None: @@ -783,9 +783,12 @@ class ToolSelectPanelHelper: return None # Note: we could show 'item.text' here but it makes the layout jitter when switching tools. # Add some spacing since the icon is currently assuming regular small icon size. - layout.label(text=" " + item.label if show_tool_name else " ", icon_value=icon_value) - if show_tool_name: + if show_tool_icon: + layout.label(text=" " + item.label, icon_value=icon_value) layout.separator() + else: + layout.label(text=item.label) + draw_settings = item.draw_settings if draw_settings is not None: draw_settings(context, layout, tool) |