[Bf-blender-cvs] [cc032189621] blender2.8: Fix T56659: Flow UI: Checkboxes report wrong width, making layouts jump to multi-columns too soon.

Bastien Montagne noreply at git.blender.org
Mon Sep 3 11:16:56 CEST 2018


Commit: cc0321896210656ae3731aa44ca896437288d580
Author: Bastien Montagne
Date:   Mon Sep 3 11:05:36 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBcc0321896210656ae3731aa44ca896437288d580

Fix T56659: Flow UI: Checkboxes report wrong width, making layouts jump to multi-columns too soon.

Wrong handling of ideal width when splitting buttons and labels appart
for checkboxes...

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

M	source/blender/editors/interface/interface_layout.c

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

diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index dea0e03fea2..86f1e5e158a 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1647,7 +1647,6 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
 			uiLayout *layout_split;
 #ifdef UI_PROP_SEP_ICON_WIDTH_EXCEPTION
 			if (type == PROP_BOOLEAN && (icon == ICON_NONE) && !icon_only) {
-				w = UI_UNIT_X;
 				layout_split = uiLayoutRow(layout_row ? layout_row : layout, true);
 			}
 			else
@@ -1702,6 +1701,12 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
 			else {
 				name = "";
 			}
+
+#ifdef UI_PROP_SEP_ICON_WIDTH_EXCEPTION
+			if (type == PROP_BOOLEAN && (icon == ICON_NONE) && !icon_only) {
+				w = UI_UNIT_X;
+			}
+#endif  /* UI_PROP_SEP_ICON_WIDTH_EXCEPTION */
 		}
 
 #ifdef UI_PROP_DECORATE



More information about the Bf-blender-cvs mailing list