Fix cramped display of tool setting enums in workspace tab.
This commit is contained in:
parent
b9b3b4a957
commit
21f35661c1
@ -567,6 +567,8 @@ class ToolSelectPanelHelper:
|
|||||||
# Note: we could show 'item.text' here but it makes the layout jitter when switching tools.
|
# Note: we could show 'item.text' here but it makes the layout jitter when switching tools.
|
||||||
# Add some spacing since the icon is currently assuming regular small icon size.
|
# Add some spacing since the icon is currently assuming regular small icon size.
|
||||||
layout.label(text=" " + item.label if show_tool_name else " ", icon_value=icon_value)
|
layout.label(text=" " + item.label if show_tool_name else " ", icon_value=icon_value)
|
||||||
|
if show_tool_name:
|
||||||
|
layout.separator()
|
||||||
draw_settings = item.draw_settings
|
draw_settings = item.draw_settings
|
||||||
if draw_settings is not None:
|
if draw_settings is not None:
|
||||||
draw_settings(context, layout, tool)
|
draw_settings(context, layout, tool)
|
||||||
|
@ -290,7 +290,8 @@ class _defs_transform:
|
|||||||
@ToolDef.from_fn
|
@ToolDef.from_fn
|
||||||
def transform():
|
def transform():
|
||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
layout.label(text="Gizmos:")
|
if not layout.use_property_split:
|
||||||
|
layout.label(text="Gizmos:")
|
||||||
tool_settings = context.tool_settings
|
tool_settings = context.tool_settings
|
||||||
layout.prop(tool_settings, "use_gizmo_mode")
|
layout.prop(tool_settings, "use_gizmo_mode")
|
||||||
|
|
||||||
@ -331,7 +332,9 @@ class _defs_view3d_select:
|
|||||||
def box():
|
def box():
|
||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
props = tool.operator_properties("view3d.select_box")
|
props = tool.operator_properties("view3d.select_box")
|
||||||
layout.prop(props, "mode", expand=True)
|
sub = layout.row()
|
||||||
|
sub.use_property_split = False
|
||||||
|
sub.prop(props, "mode", expand=True)
|
||||||
return dict(
|
return dict(
|
||||||
idname="builtin.select_box",
|
idname="builtin.select_box",
|
||||||
label="Select Box",
|
label="Select Box",
|
||||||
@ -345,7 +348,9 @@ class _defs_view3d_select:
|
|||||||
def lasso():
|
def lasso():
|
||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
props = tool.operator_properties("view3d.select_lasso")
|
props = tool.operator_properties("view3d.select_lasso")
|
||||||
layout.prop(props, "mode", expand=True)
|
sub = layout.row()
|
||||||
|
sub.use_property_split = False
|
||||||
|
sub.prop(props, "mode", expand=True)
|
||||||
return dict(
|
return dict(
|
||||||
idname="builtin.select_lasso",
|
idname="builtin.select_lasso",
|
||||||
label="Select Lasso",
|
label="Select Lasso",
|
||||||
@ -359,7 +364,9 @@ class _defs_view3d_select:
|
|||||||
def circle():
|
def circle():
|
||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
props = tool.operator_properties("view3d.select_circle")
|
props = tool.operator_properties("view3d.select_circle")
|
||||||
layout.prop(props, "mode", expand=True)
|
sub = layout.row()
|
||||||
|
sub.use_property_split = False
|
||||||
|
sub.prop(props, "mode", expand=True)
|
||||||
layout.prop(props, "radius")
|
layout.prop(props, "radius")
|
||||||
|
|
||||||
def draw_cursor(context, tool, xy):
|
def draw_cursor(context, tool, xy):
|
||||||
@ -1138,7 +1145,9 @@ class _defs_image_uv_select:
|
|||||||
def box():
|
def box():
|
||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
props = tool.operator_properties("uv.select_box")
|
props = tool.operator_properties("uv.select_box")
|
||||||
layout.prop(props, "mode", expand=True)
|
sub = layout.row()
|
||||||
|
sub.use_property_split = False
|
||||||
|
sub.prop(props, "mode", expand=True)
|
||||||
return dict(
|
return dict(
|
||||||
idname="builtin.select_box",
|
idname="builtin.select_box",
|
||||||
label="Select Box",
|
label="Select Box",
|
||||||
@ -1152,7 +1161,9 @@ class _defs_image_uv_select:
|
|||||||
def lasso():
|
def lasso():
|
||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
props = tool.operator_properties("uv.select_lasso")
|
props = tool.operator_properties("uv.select_lasso")
|
||||||
layout.prop(props, "mode", expand=True)
|
sub = layout.row()
|
||||||
|
sub.use_property_split = False
|
||||||
|
sub.prop(props, "mode", expand=True)
|
||||||
return dict(
|
return dict(
|
||||||
idname="builtin.select_lasso",
|
idname="builtin.select_lasso",
|
||||||
label="Select Lasso",
|
label="Select Lasso",
|
||||||
@ -1166,7 +1177,9 @@ class _defs_image_uv_select:
|
|||||||
def circle():
|
def circle():
|
||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
props = tool.operator_properties("uv.select_circle")
|
props = tool.operator_properties("uv.select_circle")
|
||||||
layout.prop(props, "mode", expand=True)
|
sub = layout.row()
|
||||||
|
sub.use_property_split = False
|
||||||
|
sub.prop(props, "mode", expand=True)
|
||||||
layout.prop(props, "radius")
|
layout.prop(props, "radius")
|
||||||
return dict(
|
return dict(
|
||||||
idname="builtin.select_circle",
|
idname="builtin.select_circle",
|
||||||
@ -1301,7 +1314,9 @@ class _defs_gpencil_edit:
|
|||||||
def box_select():
|
def box_select():
|
||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
props = tool.operator_properties("gpencil.select_box")
|
props = tool.operator_properties("gpencil.select_box")
|
||||||
layout.prop(props, "mode", expand=True)
|
sub = layout.row()
|
||||||
|
sub.use_property_split = False
|
||||||
|
sub.prop(props, "mode", expand=True)
|
||||||
layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold")
|
layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold")
|
||||||
return dict(
|
return dict(
|
||||||
idname="builtin.select_box",
|
idname="builtin.select_box",
|
||||||
@ -1316,7 +1331,9 @@ class _defs_gpencil_edit:
|
|||||||
def lasso_select():
|
def lasso_select():
|
||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
props = tool.operator_properties("gpencil.select_lasso")
|
props = tool.operator_properties("gpencil.select_lasso")
|
||||||
layout.prop(props, "mode", expand=True)
|
sub = layout.row()
|
||||||
|
sub.use_property_split = False
|
||||||
|
sub.prop(props, "mode", expand=True)
|
||||||
layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold")
|
layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold")
|
||||||
return dict(
|
return dict(
|
||||||
idname="builtin.select_lasso",
|
idname="builtin.select_lasso",
|
||||||
@ -1331,7 +1348,9 @@ class _defs_gpencil_edit:
|
|||||||
def circle_select():
|
def circle_select():
|
||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
props = tool.operator_properties("gpencil.select_circle")
|
props = tool.operator_properties("gpencil.select_circle")
|
||||||
layout.prop(props, "mode", expand=True)
|
sub = layout.row()
|
||||||
|
sub.use_property_split = False
|
||||||
|
sub.prop(props, "mode", expand=True)
|
||||||
layout.prop(props, "radius")
|
layout.prop(props, "radius")
|
||||||
layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold")
|
layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold")
|
||||||
return dict(
|
return dict(
|
||||||
@ -1434,7 +1453,9 @@ class _defs_node_select:
|
|||||||
def box():
|
def box():
|
||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
props = tool.operator_properties("node.select_box")
|
props = tool.operator_properties("node.select_box")
|
||||||
layout.prop(props, "mode", expand=True)
|
sub = layout.row()
|
||||||
|
sub.use_property_split = False
|
||||||
|
sub.prop(props, "mode", expand=True)
|
||||||
pass
|
pass
|
||||||
return dict(
|
return dict(
|
||||||
idname="builtin.select_box",
|
idname="builtin.select_box",
|
||||||
@ -1449,7 +1470,9 @@ class _defs_node_select:
|
|||||||
def lasso():
|
def lasso():
|
||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
props = tool.operator_properties("node.select_lasso")
|
props = tool.operator_properties("node.select_lasso")
|
||||||
layout.prop(props, "mode", expand=True)
|
sub = layout.row()
|
||||||
|
sub.use_property_split = False
|
||||||
|
sub.prop(props, "mode", expand=True)
|
||||||
return dict(
|
return dict(
|
||||||
idname="builtin.select_lasso",
|
idname="builtin.select_lasso",
|
||||||
label="Select Lasso",
|
label="Select Lasso",
|
||||||
@ -1463,7 +1486,9 @@ class _defs_node_select:
|
|||||||
def circle():
|
def circle():
|
||||||
def draw_settings(context, layout, tool):
|
def draw_settings(context, layout, tool):
|
||||||
props = tool.operator_properties("node.select_circle")
|
props = tool.operator_properties("node.select_circle")
|
||||||
layout.prop(props, "mode", expand=True)
|
sub = layout.row()
|
||||||
|
sub.use_property_split = False
|
||||||
|
sub.prop(props, "mode", expand=True)
|
||||||
layout.prop(props, "radius")
|
layout.prop(props, "radius")
|
||||||
return dict(
|
return dict(
|
||||||
idname="builtin.select_circle",
|
idname="builtin.select_circle",
|
||||||
|
Loading…
Reference in New Issue
Block a user