[Bf-blender-cvs] [8d12c2a8365] master: UI: Fix Mask popover crumpled

Pablo Vazquez noreply at git.blender.org
Fri Sep 13 00:25:39 CEST 2019


Commit: 8d12c2a83658cb6b1311197c292e5906394c4321
Author: Pablo Vazquez
Date:   Fri Sep 13 00:20:59 2019 +0200
Branches: master
https://developer.blender.org/rB8d12c2a83658cb6b1311197c292e5906394c4321

UI: Fix Mask popover crumpled

Make popover wider and image ID widget full width, like in textures properties.
Not ideal but at least the image name can be read now, until the ID widget
gets a more compact redesign.

Fixes T67748

===================================================================

M	release/scripts/startup/bl_ui/space_view3d_toolbar.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index be0690cc55d..832e5a71d20 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -772,6 +772,7 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
     bl_context = ".imagepaint"  # dot on purpose (access from topbar)
     bl_label = "Mask"
     bl_options = {'DEFAULT_CLOSED'}
+    bl_ui_units_x = 14
 
     @classmethod
     def poll(cls, context):
@@ -796,20 +797,20 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
         col = layout.column()
         col.active = ipaint.use_stencil_layer
 
+        col.label(text="Stencil Image")
+        col.template_ID(ipaint, "stencil_image", new="image.new", open="image.open")
+
         stencil_text = mesh.uv_layer_stencil.name if mesh.uv_layer_stencil else ""
-        split = col.split(factor=0.5)
+
+        col.separator()
+
+        split = col.split()
         colsub = split.column()
         colsub.alignment = 'RIGHT'
         colsub.label(text="UV Layer")
         split.column().menu("VIEW3D_MT_tools_projectpaint_stencil", text=stencil_text, translate=False)
 
-        # todo this should be combined into a single row
-        split = col.split(factor=0.5)
-        colsub = split.column()
-        colsub.alignment = 'RIGHT'
-        colsub.label(text="Stencil Image")
-        colsub = split.column()
-        colsub.template_ID(ipaint, "stencil_image", new="image.new", open="image.open")
+        col.separator()
 
         row = col.row(align=True)
         row.prop(ipaint, "stencil_color", text="Display Color")



More information about the Bf-blender-cvs mailing list