UI: Header consistency for 3D Viewport

Alignment/snapping/proportional edit to the right like in all other editors,
keeping the center for the shading/overlay settings.
This commit is contained in:
Pablo Vazquez
2018-07-02 14:50:37 +02:00
parent 69e437ba22
commit 6a323d196f

View File

@@ -97,6 +97,23 @@ 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
@@ -186,23 +203,6 @@ 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'