UI: remove redundant row for header template
authorCampbell Barton <ideasman42@gmail.com>
Sat, 20 Apr 2019 18:49:19 +0000 (04:49 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 20 Apr 2019 18:50:47 +0000 (04:50 +1000)
If it's members need to be aligned the template can handle it.

release/scripts/startup/bl_ui/space_clip.py
release/scripts/startup/bl_ui/space_dopesheet.py
release/scripts/startup/bl_ui/space_graph.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_nla.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_outliner.py
release/scripts/startup/bl_ui/space_properties.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_text.py

index 59e74f9..ffc047e 100644 (file)
@@ -267,8 +267,7 @@ class CLIP_HT_header(Header):
 
         sc = context.space_data
 
-        row = layout.row(align=True)
-        row.template_header()
+        layout.template_header()
 
         layout.prop(sc, "mode", text="")
         if sc.mode == 'TRACKING':
index 61db708..94f1292 100644 (file)
@@ -210,8 +210,7 @@ class DOPESHEET_HT_header(Header):
 
         st = context.space_data
 
-        row = layout.row(align=True)
-        row.template_header()
+        layout.template_header()
 
         if st.mode == 'TIMELINE':
             from .space_time import (
index eaa3d94..b71c058 100644 (file)
@@ -34,8 +34,7 @@ class GRAPH_HT_header(Header):
 
         st = context.space_data
 
-        row = layout.row(align=True)
-        row.template_header()
+        layout.template_header()
 
         # Now a exposed as a sub-space type
         # layout.prop(st, "mode", text="")
index 15a3f79..28edc6d 100644 (file)
@@ -513,7 +513,7 @@ class IMAGE_HT_tool_header(Header):
     def draw(self, context):
         layout = self.layout
 
-        layout.row(align=True).template_header()
+        layout.template_header()
 
         self.draw_tool_settings(context)
 
@@ -644,7 +644,7 @@ class IMAGE_HT_header(Header):
         show_maskedit = sima.show_maskedit
 
         if not sima.show_region_tool_header:
-            layout.row(align=True).template_header()
+            layout.template_header()
 
         if sima.mode != 'UV':
             layout.prop(sima, "ui_mode", text="")
index 8c5c360..ba94769 100644 (file)
@@ -33,8 +33,7 @@ class NLA_HT_header(Header):
 
         st = context.space_data
 
-        row = layout.row(align=True)
-        row.template_header()
+        layout.template_header()
 
         NLA_MT_editor_menus.draw_collapsible(context, layout)
 
index caab793..f31b8de 100644 (file)
@@ -51,8 +51,7 @@ class NODE_HT_header(Header):
         id_from = snode.id_from
         tool_settings = context.tool_settings
 
-        row = layout.row(align=True)
-        row.template_header()
+        layout.template_header()
 
         # Now expanded via the 'ui_type'
         # layout.prop(snode, "tree_type", text="")
index 6107542..43907f9 100644 (file)
@@ -32,8 +32,7 @@ class OUTLINER_HT_header(Header):
         scene = context.scene
         ks = context.scene.keying_sets.active
 
-        row = layout.row(align=True)
-        row.template_header()
+        layout.template_header()
 
         layout.prop(space, "display_mode", icon_only=True)
 
index 5cdcdaa..7d9ca68 100644 (file)
@@ -26,8 +26,7 @@ class PROPERTIES_HT_header(Header):
     def draw(self, _context):
         layout = self.layout
 
-        row = layout.row()
-        row.template_header()
+        layout.template_header()
 
 
 class PROPERTIES_PT_navigation_bar(Panel):
index 942656f..87ebf36 100644 (file)
@@ -83,8 +83,7 @@ class SEQUENCER_HT_header(Header):
         st = context.space_data
         scene = context.scene
 
-        row = layout.row(align=True)
-        row.template_header()
+        layout.template_header()
 
         layout.prop(st, "view_type", text="")
 
index 3b5cc0e..0b83aca 100644 (file)
@@ -31,8 +31,7 @@ class TEXT_HT_header(Header):
         st = context.space_data
         text = st.text
 
-        row = layout.row(align=True)
-        row.template_header()
+        layout.template_header()
 
         TEXT_MT_editor_menus.draw_collapsible(context, layout)