Fix part of [#28088] bad button spacing with layout engine for menu items.
authorThomas Dinges <blender@dingto.org>
Tue, 26 Jul 2011 20:05:17 +0000 (20:05 +0000)
committerThomas Dinges <blender@dingto.org>
Tue, 26 Jul 2011 20:05:17 +0000 (20:05 +0000)
* Fixed a cut off text.
* small cleanup

release/scripts/startup/bl_ui/space_text.py

index 582c9442a4a2ce56273ab9fd169d0c17780eaf82..b787fc5cf75f26f197f6c3b79226b864d5ec1409 100644 (file)
@@ -33,22 +33,21 @@ class TEXT_HT_header(bpy.types.Header):
         row.template_header()
 
         if context.area.show_menus:
-            sub = row.row(align=True)
-            sub.menu("TEXT_MT_view")
-            sub.menu("TEXT_MT_text")
+            row.menu("TEXT_MT_view")
+            row.menu("TEXT_MT_text")
 
             if text:
-                sub.menu("TEXT_MT_edit")
-                sub.menu("TEXT_MT_format")
+                row.menu("TEXT_MT_edit")
+                row.menu("TEXT_MT_format")
 
-            sub.menu("TEXT_MT_templates")
+            row.menu("TEXT_MT_templates")
 
         if text and text.is_modified:
-            row = layout.row()
-            row.alert = True
-            row.operator("text.resolve_conflict", text="", icon='HELP')
+            sub = row.row()
+            sub.alert = True
+            sub.operator("text.resolve_conflict", text="", icon='HELP')
 
-        layout.template_ID(st, "text", new="text.new", unlink="text.unlink")
+        row.template_ID(st, "text", new="text.new", unlink="text.unlink")
 
         row = layout.row(align=True)
         row.prop(st, "show_line_numbers", text="")