diff options
author | William Reynish <billreynish> | 2018-06-28 01:28:32 +0300 |
---|---|---|
committer | Pablo Vazquez <venomgfx@gmail.com> | 2018-06-28 01:29:04 +0300 |
commit | 252d1d8e226a9f9c491b81405cd454bfcc263e78 (patch) | |
tree | 8e7b6f596a2e92aeb2e9174a1f8b41f4e4ae591d /release/scripts | |
parent | a009f2659fb627c62a3a2444e1f6d913ff63af2b (diff) |
UI: Center ID Blocks in Text Editor
See T55635
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_text.py | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index b1af82c95fe..eccb0ecdddf 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -42,26 +42,21 @@ class TEXT_HT_header(Header): sub.operator("text.resolve_conflict", text="", icon='HELP') row = layout.row(align=True) - row.template_ID(st, "text", new="text.new", unlink="text.unlink", open="text.open") - - row = layout.row(align=True) row.prop(st, "show_line_numbers", text="") row.prop(st, "show_word_wrap", text="") row.prop(st, "show_syntax_highlight", text="") - if text: - osl = text.name.endswith(".osl") or text.name.endswith(".oso") + layout.separator_spacer()
- if osl: - row = layout.row() - row.operator("node.shader_script_update") - else: - row = layout.row() - row.operator("text.run_script") + row = layout.row(align=True)
+ row.template_ID(st, "text", new="text.new", unlink="text.unlink", open="text.open")
+
+ layout.separator_spacer()
- row = layout.row() - row.active = text.name.endswith(".py") - row.prop(text, "use_module") +
+
+ if text:
+ osl = text.name.endswith(".osl") or text.name.endswith(".oso")
row = layout.row() if text.filepath: @@ -75,6 +70,18 @@ class TEXT_HT_header(Header): row.label(text="Text: External" if text.library else "Text: Internal") + if osl:
+ row = layout.row()
+ row.operator("node.shader_script_update")
+ else:
+ row = layout.row()
+ row.active = text.name.endswith(".py")
+ row.prop(text, "use_module")
+
+ row = layout.row()
+ row.operator("text.run_script")
+
+
class TEXT_MT_editor_menus(Menu): |