From 8d12c2a83658cb6b1311197c292e5906394c4321 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Fri, 13 Sep 2019 00:20:59 +0200 Subject: [PATCH] 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 --- .../startup/bl_ui/space_view3d_toolbar.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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")