[Bf-blender-cvs] [e4ab04b8bbc] blender2.8: Fix pop-over buttons always getting space for icon

Campbell Barton noreply at git.blender.org
Wed Jun 13 11:22:20 CEST 2018


Commit: e4ab04b8bbc71145833fda660e4ec76d9b2d29a2
Author: Campbell Barton
Date:   Wed Jun 13 11:20:50 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBe4ab04b8bbc71145833fda660e4ec76d9b2d29a2

Fix pop-over buttons always getting space for icon

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

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 5387f133641..cd11f529a6d 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1985,7 +1985,10 @@ static uiBut *ui_item_menu(
 	h = UI_UNIT_Y;
 
 	if (layout->root->type == UI_LAYOUT_HEADER) { /* ugly .. */
-		if (force_menu) {
+		if (icon == ICON_NONE) {
+			/* pass */
+		}
+		else if (force_menu) {
 			w += UI_UNIT_X;
 		}
 		else {



More information about the Bf-blender-cvs mailing list