UI: Display panel tweaks
authorWilliam Reynish <billrey@me.com>
Fri, 3 May 2019 08:26:24 +0000 (10:26 +0200)
committerWilliam Reynish <billrey@me.com>
Fri, 3 May 2019 08:26:24 +0000 (10:26 +0200)
  - Use Display As rather than Draw Type, following naming conventions
  - Rename Advanced subpanel to Stretching, since that more accurately describes what it's for

release/scripts/startup/bl_ui/space_image.py
source/blender/makesrna/intern/rna_space.c

index b27895f..af357a8 100644 (file)
@@ -866,9 +866,8 @@ class IMAGE_PT_view_display_uv_edit_overlays(Panel):
 
         col = layout.column()
 
+        col.prop(uvedit, "edge_display_type", text="Display As")
         col.prop(uvedit, "show_edges", text="Edges")
-        col.prop(uvedit, "edge_display_type", text="Draw Type")
-
         col.prop(uvedit, "show_faces", text="Faces")
 
         col = layout.column()
@@ -876,10 +875,10 @@ class IMAGE_PT_view_display_uv_edit_overlays(Panel):
         col.prop(uvedit, "show_modified_edges", text="Modified")
 
 
-class IMAGE_PT_view_display_uv_edit_overlays_advanced(Panel):
+class IMAGE_PT_view_display_uv_edit_overlays_stretch(Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'UI'
-    bl_label = "Advanced"
+    bl_label = "Stretching"
     bl_parent_id = 'IMAGE_PT_view_display_uv_edit_overlays'
     bl_category = "View"
     bl_options = {'DEFAULT_CLOSED'}
@@ -889,6 +888,11 @@ class IMAGE_PT_view_display_uv_edit_overlays_advanced(Panel):
         sima = context.space_data
         return (sima and (sima.show_uvedit))
 
+    def draw_header(self, context):
+        sima = context.space_data
+        uvedit = sima.uv_editor
+        self.layout.prop(uvedit, "show_stretch", text="")
+
     def draw(self, context):
         layout = self.layout
         layout.use_property_split = True
@@ -896,12 +900,8 @@ class IMAGE_PT_view_display_uv_edit_overlays_advanced(Panel):
         sima = context.space_data
         uvedit = sima.uv_editor
 
-        col = layout.column()
-        col.prop(uvedit, "show_stretch", text="Stretch")
-
-        sub = col.column()
-        sub.active = uvedit.show_stretch
-        sub.prop(uvedit, "display_stretch_type", text="Type")
+        layout.active = uvedit.show_stretch
+        layout.prop(uvedit, "display_stretch_type", text="Type")
 
 
 class IMAGE_UL_render_slots(UIList):
@@ -1636,7 +1636,7 @@ classes = (
     IMAGE_PT_render_slots,
     IMAGE_PT_view_display,
     IMAGE_PT_view_display_uv_edit_overlays,
-    IMAGE_PT_view_display_uv_edit_overlays_advanced,
+    IMAGE_PT_view_display_uv_edit_overlays_stretch,
     IMAGE_PT_paint,
     IMAGE_PT_paint_color,
     IMAGE_PT_paint_swatches,
index 6331642..1e14fd0 100644 (file)
@@ -2608,7 +2608,7 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
   prop = RNA_def_property(srna, "edge_display_type", PROP_ENUM, PROP_NONE);
   RNA_def_property_enum_sdna(prop, NULL, "dt_uv");
   RNA_def_property_enum_items(prop, dt_uv_items);
-  RNA_def_property_ui_text(prop, "Edge Display Type", "Display type for drawing UV edges");
+  RNA_def_property_ui_text(prop, "Display As", "Display style for UV edges");
   RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL);
 
   prop = RNA_def_property(srna, "show_smooth_edges", PROP_BOOLEAN, PROP_NONE);