[Bf-blender-cvs] [21f35661c1d] master: Fix cramped display of tool setting enums in workspace tab.
Brecht Van Lommel
noreply at git.blender.org
Fri Mar 29 17:57:07 CET 2019
Commit: 21f35661c1d48f1eb0591f5aa1a0421da54a4ba0
Author: Brecht Van Lommel
Date: Fri Mar 29 17:53:56 2019 +0100
Branches: master
https://developer.blender.org/rB21f35661c1d48f1eb0591f5aa1a0421da54a4ba0
Fix cramped display of tool setting enums in workspace tab.
===================================================================
M release/scripts/startup/bl_ui/space_toolsystem_common.py
M release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index 4e3cecf2631..aa9e0bf979f 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -567,6 +567,8 @@ class ToolSelectPanelHelper:
# 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.
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
if draw_settings is not None:
draw_settings(context, layout, tool)
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 7bbf96a8175..90a25182437 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -290,7 +290,8 @@ class _defs_transform:
@ToolDef.from_fn
def transform():
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
layout.prop(tool_settings, "use_gizmo_mode")
@@ -331,7 +332,9 @@ class _defs_view3d_select:
def box():
def draw_settings(context, layout, tool):
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(
idname="builtin.select_box",
label="Select Box",
@@ -345,7 +348,9 @@ class _defs_view3d_select:
def lasso():
def draw_settings(context, layout, tool):
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(
idname="builtin.select_lasso",
label="Select Lasso",
@@ -359,7 +364,9 @@ class _defs_view3d_select:
def circle():
def draw_settings(context, layout, tool):
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")
def draw_cursor(context, tool, xy):
@@ -1138,7 +1145,9 @@ class _defs_image_uv_select:
def box():
def draw_settings(context, layout, tool):
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(
idname="builtin.select_box",
label="Select Box",
@@ -1152,7 +1161,9 @@ class _defs_image_uv_select:
def lasso():
def draw_settings(context, layout, tool):
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(
idname="builtin.select_lasso",
label="Select Lasso",
@@ -1166,7 +1177,9 @@ class _defs_image_uv_select:
def circle():
def draw_settings(context, layout, tool):
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")
return dict(
idname="builtin.select_circle",
@@ -1301,7 +1314,9 @@ class _defs_gpencil_edit:
def box_select():
def draw_settings(context, layout, tool):
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")
return dict(
idname="builtin.select_box",
@@ -1316,7 +1331,9 @@ class _defs_gpencil_edit:
def lasso_select():
def draw_settings(context, layout, tool):
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")
return dict(
idname="builtin.select_lasso",
@@ -1331,7 +1348,9 @@ class _defs_gpencil_edit:
def circle_select():
def draw_settings(context, layout, tool):
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(context.tool_settings.gpencil_sculpt, "intersection_threshold")
return dict(
@@ -1434,7 +1453,9 @@ class _defs_node_select:
def box():
def draw_settings(context, layout, tool):
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
return dict(
idname="builtin.select_box",
@@ -1449,7 +1470,9 @@ class _defs_node_select:
def lasso():
def draw_settings(context, layout, tool):
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(
idname="builtin.select_lasso",
label="Select Lasso",
@@ -1463,7 +1486,9 @@ class _defs_node_select:
def circle():
def draw_settings(context, layout, tool):
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")
return dict(
idname="builtin.select_circle",
More information about the Bf-blender-cvs
mailing list