UI: Fix disconnected and non-clickable checkbox labels in popovers #105657
|
@ -106,10 +106,14 @@ class GreasePencilDisplayPanel:
|
||||||
settings = tool_settings.gpencil_vertex_paint
|
settings = tool_settings.gpencil_vertex_paint
|
||||||
brush = settings.brush
|
brush = settings.brush
|
||||||
gp_settings = brush.gpencil_settings
|
gp_settings = brush.gpencil_settings
|
||||||
|
|
||||||
ob = context.active_object
|
ob = context.active_object
|
||||||
if ob.mode == 'PAINT_GPENCIL':
|
|
||||||
|
|
||||||
|
if self.is_popover and ob.mode not in {'PAINT_GPENCIL', 'VERTEX_GPENCIL'}:
|
||||||
|
row = layout.row(align=True)
|
||||||
|
row.use_property_split = False
|
||||||
|
row.prop(settings, "show_brush", text="Display Cursor")
|
||||||
|
|
||||||
|
if ob.mode == 'PAINT_GPENCIL':
|
||||||
if self.is_popover:
|
if self.is_popover:
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.prop(settings, "show_brush", text="Display Cursor")
|
row.prop(settings, "show_brush", text="Display Cursor")
|
||||||
|
@ -135,8 +139,7 @@ class GreasePencilDisplayPanel:
|
||||||
|
|
||||||
elif ob.mode == 'VERTEX_GPENCIL':
|
elif ob.mode == 'VERTEX_GPENCIL':
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.prop(settings, "show_brush", text="")
|
row.prop(settings, "show_brush", text="Display Cursor")
|
||||||
row.label(text="Display Cursor")
|
|
||||||
|
|
||||||
|
|
||||||
class GreasePencilBrushFalloff:
|
class GreasePencilBrushFalloff:
|
||||||
|
|
|
@ -378,7 +378,9 @@ class SmoothStrokePanel(BrushPanel):
|
||||||
settings = self.paint_settings(context)
|
settings = self.paint_settings(context)
|
||||||
brush = settings.brush
|
brush = settings.brush
|
||||||
|
|
||||||
self.layout.prop(brush, "use_smooth_stroke", text="")
|
self.layout.use_property_split = False
|
||||||
|
self.layout.prop(brush, "use_smooth_stroke",
|
||||||
|
text=self.bl_label if self.is_popover else "")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
@ -472,8 +474,8 @@ class DisplayPanel(BrushPanel):
|
||||||
|
|
||||||
if self.is_popover:
|
if self.is_popover:
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.prop(settings, "show_brush", text="")
|
row.use_property_split = False
|
||||||
row.label(text="Display Cursor")
|
row.prop(settings, "show_brush", text="Display Cursor")
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
col.active = brush.brush_capabilities.has_overlay and settings.show_brush
|
col.active = brush.brush_capabilities.has_overlay and settings.show_brush
|
||||||
|
|
|
@ -203,8 +203,9 @@ class VIEW3D_PT_tools_meshedit_options_automerge(View3DPanel, Panel):
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
tool_settings = context.tool_settings
|
tool_settings = context.tool_settings
|
||||||
|
self.layout.use_property_split = False
|
||||||
self.layout.prop(tool_settings, "use_mesh_automerge", text="", toggle=False)
|
self.layout.prop(tool_settings, "use_mesh_automerge",
|
||||||
|
text=self.bl_label if self.is_popover else "", toggle=False)
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
@ -612,7 +613,8 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
ipaint = context.tool_settings.image_paint
|
ipaint = context.tool_settings.image_paint
|
||||||
self.layout.prop(ipaint, "use_stencil_layer", text="")
|
self.layout.prop(ipaint, "use_stencil_layer",
|
||||||
|
text=self.bl_label if self.is_popover else "")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
@ -794,7 +796,8 @@ class VIEW3D_PT_tools_brush_falloff_frontface(View3DPaintPanel, Panel):
|
||||||
settings = self.paint_settings(context)
|
settings = self.paint_settings(context)
|
||||||
brush = settings.brush
|
brush = settings.brush
|
||||||
|
|
||||||
self.layout.prop(brush, "use_frontface_falloff", text="")
|
self.layout.prop(brush, "use_frontface_falloff",
|
||||||
|
text=self.bl_label if self.is_popover else "")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
settings = self.paint_settings(context)
|
settings = self.paint_settings(context)
|
||||||
|
@ -823,7 +826,8 @@ class VIEW3D_PT_tools_brush_falloff_normal(View3DPaintPanel, Panel):
|
||||||
tool_settings = context.tool_settings
|
tool_settings = context.tool_settings
|
||||||
ipaint = tool_settings.image_paint
|
ipaint = tool_settings.image_paint
|
||||||
|
|
||||||
self.layout.prop(ipaint, "use_normal_falloff", text="")
|
self.layout.prop(ipaint, "use_normal_falloff",
|
||||||
|
text=self.bl_label if self.is_popover else "")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
tool_settings = context.tool_settings
|
tool_settings = context.tool_settings
|
||||||
|
@ -1273,7 +1277,8 @@ class VIEW3D_PT_tools_imagepaint_options_cavity(View3DPaintPanel, Panel):
|
||||||
tool_settings = context.tool_settings
|
tool_settings = context.tool_settings
|
||||||
ipaint = tool_settings.image_paint
|
ipaint = tool_settings.image_paint
|
||||||
|
|
||||||
self.layout.prop(ipaint, "use_cavity", text="")
|
self.layout.prop(ipaint, "use_cavity",
|
||||||
|
text=self.bl_label if self.is_popover else "")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
@ -1615,8 +1620,9 @@ class VIEW3D_PT_tools_grease_pencil_brush_stroke(Panel, View3DPanel):
|
||||||
return brush is not None and brush.gpencil_tool == 'DRAW'
|
return brush is not None and brush.gpencil_tool == 'DRAW'
|
||||||
|
|
||||||
def draw(self, _context):
|
def draw(self, _context):
|
||||||
# layout = self.layout
|
layout = self.layout
|
||||||
pass
|
layout.use_property_split = True
|
||||||
|
layout.use_property_decorate = False
|
||||||
|
|
||||||
|
|
||||||
class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(Panel, View3DPanel):
|
class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(Panel, View3DPanel):
|
||||||
|
@ -1632,12 +1638,11 @@ class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(Panel, View3DPanel):
|
||||||
return brush is not None and brush.gpencil_tool == 'DRAW'
|
return brush is not None and brush.gpencil_tool == 'DRAW'
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
if self.is_popover:
|
|
||||||
return
|
|
||||||
|
|
||||||
brush = context.tool_settings.gpencil_paint.brush
|
brush = context.tool_settings.gpencil_paint.brush
|
||||||
gp_settings = brush.gpencil_settings
|
gp_settings = brush.gpencil_settings
|
||||||
self.layout.prop(gp_settings, "use_settings_stabilizer", text="")
|
self.layout.use_property_split = False
|
||||||
|
self.layout.prop(gp_settings, "use_settings_stabilizer",
|
||||||
|
text=self.bl_label if self.is_popover else "")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
@ -1647,11 +1652,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(Panel, View3DPanel):
|
||||||
brush = context.tool_settings.gpencil_paint.brush
|
brush = context.tool_settings.gpencil_paint.brush
|
||||||
gp_settings = brush.gpencil_settings
|
gp_settings = brush.gpencil_settings
|
||||||
|
|
||||||
if self.is_popover:
|
|
||||||
row = layout.row()
|
|
||||||
row.prop(gp_settings, "use_settings_stabilizer", text="")
|
|
||||||
row.label(text=self.bl_label)
|
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
col.active = gp_settings.use_settings_stabilizer
|
col.active = gp_settings.use_settings_stabilizer
|
||||||
|
|
||||||
|
@ -1672,12 +1672,11 @@ class VIEW3D_PT_tools_grease_pencil_brush_post_processing(View3DPanel, Panel):
|
||||||
return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL', 'TINT'}
|
return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL', 'TINT'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
if self.is_popover:
|
|
||||||
return
|
|
||||||
|
|
||||||
brush = context.tool_settings.gpencil_paint.brush
|
brush = context.tool_settings.gpencil_paint.brush
|
||||||
gp_settings = brush.gpencil_settings
|
gp_settings = brush.gpencil_settings
|
||||||
self.layout.prop(gp_settings, "use_settings_postprocess", text="")
|
self.layout.use_property_split = False
|
||||||
|
self.layout.prop(gp_settings, "use_settings_postprocess",
|
||||||
|
text=self.bl_label if self.is_popover else "")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
@ -1687,11 +1686,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_post_processing(View3DPanel, Panel):
|
||||||
brush = context.tool_settings.gpencil_paint.brush
|
brush = context.tool_settings.gpencil_paint.brush
|
||||||
gp_settings = brush.gpencil_settings
|
gp_settings = brush.gpencil_settings
|
||||||
|
|
||||||
if self.is_popover:
|
|
||||||
row = layout.row()
|
|
||||||
row.prop(gp_settings, "use_settings_postprocess", text="")
|
|
||||||
row.label(text=self.bl_label)
|
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
col.active = gp_settings.use_settings_postprocess
|
col.active = gp_settings.use_settings_postprocess
|
||||||
|
|
||||||
|
@ -1734,12 +1728,11 @@ class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel):
|
||||||
return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL', 'TINT'}
|
return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL', 'TINT'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
if self.is_popover:
|
|
||||||
return
|
|
||||||
|
|
||||||
brush = context.tool_settings.gpencil_paint.brush
|
brush = context.tool_settings.gpencil_paint.brush
|
||||||
gp_settings = brush.gpencil_settings
|
gp_settings = brush.gpencil_settings
|
||||||
self.layout.prop(gp_settings, "use_settings_random", text="")
|
self.layout.use_property_split = False
|
||||||
|
self.layout.prop(gp_settings, "use_settings_random",
|
||||||
|
text=self.bl_label if self.is_popover else "")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
@ -1751,11 +1744,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel):
|
||||||
mode = tool_settings.gpencil_paint.color_mode
|
mode = tool_settings.gpencil_paint.color_mode
|
||||||
gp_settings = brush.gpencil_settings
|
gp_settings = brush.gpencil_settings
|
||||||
|
|
||||||
if self.is_popover:
|
|
||||||
row = layout.row()
|
|
||||||
row.prop(gp_settings, "use_settings_random", text="")
|
|
||||||
row.label(text=self.bl_label)
|
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
col.enabled = gp_settings.use_settings_random
|
col.enabled = gp_settings.use_settings_random
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue