Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-29 19:53:56 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-29 19:56:42 +0300
commit21f35661c1d48f1eb0591f5aa1a0421da54a4ba0 (patch)
treef2eb767fa9805d8390fe7f0db9deaae26de9786c /release/scripts
parentb9b3b4a957e84d5f8c544be38a128c4df4c67a0d (diff)
Fix cramped display of tool setting enums in workspace tab.
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_common.py2
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py51
2 files changed, 40 insertions, 13 deletions
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",