UI: Remove extra padding on Annotate tool settings

For some reason the Annotate tool has an extra padding when compared to
other tools. This makes the UI to flicker a bit (specially with D12939
applied).

Differential Revision: https://developer.blender.org/D12943
This commit is contained in:
Dalai Felinto 2021-10-20 17:53:03 +02:00
parent 9959c5315f
commit 1de8374374
1 changed files with 1 additions and 7 deletions

View File

@ -185,23 +185,18 @@ class _defs_annotate:
tool_settings = context.tool_settings
if space_type == 'VIEW_3D':
layout.separator()
row = layout.row(align=True)
row.prop(tool_settings, "annotation_stroke_placement_view3d", text="Placement")
if tool_settings.gpencil_stroke_placement_view3d == 'CURSOR':
row.prop(tool_settings.gpencil_sculpt, "lockaxis")
elif tool_settings.gpencil_stroke_placement_view3d in {'SURFACE', 'STROKE'}:
row.prop(tool_settings, "use_gpencil_stroke_endpoints")
elif space_type in {'IMAGE_EDITOR', 'NODE_EDITOR', 'SEQUENCE_EDITOR', 'CLIP_EDITOR'}:
layout.separator()
elif space_type in {'IMAGE_EDITOR', 'NODE_EDITOR', 'SEQUENCE_EDITOR', 'CLIP_EDITOR'}:
row = layout.row(align=True)
row.prop(tool_settings, "annotation_stroke_placement_view2d", text="Placement")
if tool.idname == "builtin.annotate_line":
layout.separator()
props = tool.operator_properties("gpencil.annotate")
if region_type == 'TOOL_HEADER':
row = layout.row()
@ -223,7 +218,6 @@ class _defs_annotate:
subrow.prop(props, "stabilizer_radius", text="Radius", slider=True)
subrow.prop(props, "stabilizer_factor", text="Factor", slider=True)
else:
layout.separator()
layout.prop(props, "use_stabilizer", text="Stabilize Stroke")
col = layout.column(align=False)
col.active = props.use_stabilizer