UI: 3D Viewport Header - swap position of shading/snapping settings

When tweaking the shading/overlays settings through the popovers,
these get on the way of the content in the viewport. Making it hard to
see the result of our changes.

Unfortunately this breaks consistency with other headers where the snapping
tools are aligned to the right, but the benefits outweigh the costs.
This commit is contained in:
Pablo Vazquez
2018-07-11 13:06:01 +02:00
parent 78fc4b592a
commit 160959152e

View File

@@ -97,23 +97,6 @@ class VIEW3D_HT_header(Header):
layout.separator_spacer()
# Viewport Settings
row = layout.row(align=True)
row.prop(shading, "type", text="", expand=True)
sub = row.row(align=True)
sub.enabled = shading.type != 'RENDERED'
sub.popover(space_type='VIEW_3D', region_type='HEADER', panel_type="VIEW3D_PT_shading")
row = layout.row(align=True)
row.prop(overlay, "show_overlays", icon='WIRE', text="")
sub = row.row(align=True)
sub.active = overlay.show_overlays
sub.popover(space_type='VIEW_3D', region_type='HEADER', panel_type="VIEW3D_PT_overlay")
layout.separator_spacer()
# Mode & Transform Settings
scene = context.scene
@@ -223,6 +206,23 @@ class VIEW3D_HT_header(Header):
text="",
)
layout.separator_spacer()
# Viewport Settings
row = layout.row(align=True)
row.prop(shading, "type", text="", expand=True)
sub = row.row(align=True)
sub.enabled = shading.type != 'RENDERED'
sub.popover(space_type='VIEW_3D', region_type='HEADER', panel_type="VIEW3D_PT_shading")
row = layout.row(align=True)
row.prop(overlay, "show_overlays", icon='WIRE', text="")
sub = row.row(align=True)
sub.active = overlay.show_overlays
sub.popover(space_type='VIEW_3D', region_type='HEADER', panel_type="VIEW3D_PT_overlay")
class VIEW3D_MT_editor_menus(Menu):
bl_space_type = 'VIEW3D_MT_editor_menus'