[Bf-blender-cvs] [351d7822862] blender2.8: UI: disable 3 column toolbars

Campbell Barton noreply at git.blender.org
Fri Apr 27 18:23:07 CEST 2018


Commit: 351d7822862003047022f26f1b719e5678d8b8bc
Author: Campbell Barton
Date:   Fri Apr 27 18:20:48 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB351d7822862003047022f26f1b719e5678d8b8bc

UI: disable 3 column toolbars

They conflict a little with showing a narrow toolbar w/ text.

===================================================================

M	release/scripts/startup/bl_ui/space_toolsystem_common.py
M	source/blender/editors/space_view3d/space_view3d.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index 8f9d1735e9f..5cf5c1182d5 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -252,16 +252,13 @@ class ToolSelectPanelHelper:
         del view2d, ui_scale
 
         empty_text = ""
-        if width_scale > 200.0:
+        if width_scale > 120.0:
             show_text = True
             use_columns = False
         else:
             show_text = False
-            if width_scale > 120.0:
-                column_count = 3
-                use_columns = True
-                empty_text = " "  # needed for alignment, grr
-            elif width_scale > 80.0:
+            # 2 column layout, disabled
+            if width_scale > 80.0:
                 column_count = 2
                 use_columns = True
                 empty_text = " "  # needed for alignment, grr
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 5fcffc75693..c219da36faf 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -1268,7 +1268,7 @@ static int view3d_tools_region_snap_size(const ARegion *ar, int size, int axis)
 {
 	if (axis == 0) {
 		/* Note, this depends on the icon size: see #ICON_DEFAULT_HEIGHT_TOOLBAR. */
-		const float snap_units[3] = {3 + 0.25f, 5 + 0.25, 7 + 0.25};
+		const float snap_units[] = {3 + 0.25f, 5 + 0.25};
 		const float aspect = BLI_rctf_size_x(&ar->v2d.cur) / (BLI_rcti_size_x(&ar->v2d.mask) + 1);
 		int best_diff = INT_MAX;
 		int best_size = size;



More information about the Bf-blender-cvs mailing list