[Bf-blender-cvs] [31bdb31ecf5] master: Fix: width of UILayout.prop_enum() buttons

raa noreply at git.blender.org
Tue Apr 11 12:26:09 CEST 2017


Commit: 31bdb31ecf541960f7edcf564107ef8f75b0ee9b
Author: raa
Date:   Tue Apr 11 13:25:46 2017 +0300
Branches: master
https://developer.blender.org/rB31bdb31ecf541960f7edcf564107ef8f75b0ee9b

Fix: width of UILayout.prop_enum() buttons

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

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 9b6547cf8a1..30a2094fee7 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1274,7 +1274,8 @@ static void ui_item_rna_size(
 	if (!w) {
 		if (type == PROP_ENUM && icon_only) {
 			w = ui_text_icon_width(layout, "", ICON_BLANK1, 0);
-			w += 0.6f * UI_UNIT_X;
+			if (index != RNA_ENUM_VALUE)
+				w += 0.6f * UI_UNIT_X;
 		}
 		else {
 			w = ui_text_icon_width(layout, name, icon, 0);




More information about the Bf-blender-cvs mailing list