diff --git a/scripts/startup/bl_ui/properties_grease_pencil_common.py b/scripts/startup/bl_ui/properties_grease_pencil_common.py index 1403bb0d07e..0ffca93a741 100644 --- a/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -106,10 +106,14 @@ class GreasePencilDisplayPanel: settings = tool_settings.gpencil_vertex_paint brush = settings.brush gp_settings = brush.gpencil_settings - 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: row = layout.row(align=True) row.prop(settings, "show_brush", text="Display Cursor") @@ -135,8 +139,7 @@ class GreasePencilDisplayPanel: elif ob.mode == 'VERTEX_GPENCIL': row = layout.row(align=True) - row.prop(settings, "show_brush", text="") - row.label(text="Display Cursor") + row.prop(settings, "show_brush", text="Display Cursor") class GreasePencilBrushFalloff: diff --git a/scripts/startup/bl_ui/properties_paint_common.py b/scripts/startup/bl_ui/properties_paint_common.py index 63dd18cb703..e99b5466f2b 100644 --- a/scripts/startup/bl_ui/properties_paint_common.py +++ b/scripts/startup/bl_ui/properties_paint_common.py @@ -378,7 +378,9 @@ class SmoothStrokePanel(BrushPanel): settings = self.paint_settings(context) 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): layout = self.layout @@ -472,8 +474,8 @@ class DisplayPanel(BrushPanel): if self.is_popover: row = layout.row(align=True) - row.prop(settings, "show_brush", text="") - row.label(text="Display Cursor") + row.use_property_split = False + row.prop(settings, "show_brush", text="Display Cursor") col = layout.column() col.active = brush.brush_capabilities.has_overlay and settings.show_brush diff --git a/scripts/startup/bl_ui/space_view3d_toolbar.py b/scripts/startup/bl_ui/space_view3d_toolbar.py index c6d6a77eec2..79ebd8b5614 100644 --- a/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -203,8 +203,9 @@ class VIEW3D_PT_tools_meshedit_options_automerge(View3DPanel, Panel): def draw_header(self, context): tool_settings = context.tool_settings - - self.layout.prop(tool_settings, "use_mesh_automerge", text="", toggle=False) + self.layout.use_property_split = False + self.layout.prop(tool_settings, "use_mesh_automerge", + text=self.bl_label if self.is_popover else "", toggle=False) def draw(self, context): layout = self.layout @@ -612,7 +613,8 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel): def draw_header(self, context): 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): layout = self.layout @@ -794,7 +796,8 @@ class VIEW3D_PT_tools_brush_falloff_frontface(View3DPaintPanel, Panel): settings = self.paint_settings(context) 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): settings = self.paint_settings(context) @@ -823,7 +826,8 @@ class VIEW3D_PT_tools_brush_falloff_normal(View3DPaintPanel, Panel): tool_settings = context.tool_settings 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): tool_settings = context.tool_settings @@ -1273,7 +1277,8 @@ class VIEW3D_PT_tools_imagepaint_options_cavity(View3DPaintPanel, Panel): tool_settings = context.tool_settings 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): 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' def draw(self, _context): - # layout = self.layout - pass + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False 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' def draw_header(self, context): - if self.is_popover: - return - brush = context.tool_settings.gpencil_paint.brush 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): layout = self.layout @@ -1647,11 +1652,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(Panel, View3DPanel): brush = context.tool_settings.gpencil_paint.brush 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.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'} def draw_header(self, context): - if self.is_popover: - return - brush = context.tool_settings.gpencil_paint.brush 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): 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 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.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'} def draw_header(self, context): - if self.is_popover: - return - brush = context.tool_settings.gpencil_paint.brush 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): layout = self.layout @@ -1751,11 +1744,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel): mode = tool_settings.gpencil_paint.color_mode 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.enabled = gp_settings.use_settings_random