[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46899] trunk/blender: Long old UI annoyance:

Ton Roosendaal ton at blender.org
Tue May 22 17:50:13 CEST 2012


Revision: 46899
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46899
Author:   ton
Date:     2012-05-22 15:50:13 +0000 (Tue, 22 May 2012)
Log Message:
-----------
Long old UI annoyance:

The up/down triangle icon for menus was not drawing when a menu had
an icon; even though space was reserved there. Note: this can only
work now with removing the ugly "down triangle" icon from buttons like
next to the Material list box (button pops up menu with tools).

Looks nicer this way anyway.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py
    trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py
    trunk/blender/release/scripts/startup/bl_ui/properties_material.py
    trunk/blender/release/scripts/startup/bl_ui/properties_texture.py
    trunk/blender/source/blender/editors/interface/interface_widgets.c

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py	2012-05-22 15:49:41 UTC (rev 46898)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py	2012-05-22 15:50:13 UTC (rev 46899)
@@ -130,7 +130,7 @@
         col.active = (ob.proxy is None)
         col.operator("pose.group_add", icon='ZOOMIN', text="")
         col.operator("pose.group_remove", icon='ZOOMOUT', text="")
-        col.menu("DATA_PT_bone_group_specials", icon='DOWNARROW_HLT', text="")
+        col.menu("DATA_PT_bone_group_specials", icon='BLANK1', text="")
         if group:
             col.separator()
             col.operator("pose.group_move", icon='TRIA_UP', text="").direction = 'UP'

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py	2012-05-22 15:49:41 UTC (rev 46898)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py	2012-05-22 15:50:13 UTC (rev 46899)
@@ -149,7 +149,7 @@
         col = row.column(align=True)
         col.operator("object.vertex_group_add", icon='ZOOMIN', text="")
         col.operator("object.vertex_group_remove", icon='ZOOMOUT', text="")
-        col.menu("MESH_MT_vertex_group_specials", icon='DOWNARROW_HLT', text="")
+        col.menu("MESH_MT_vertex_group_specials", icon='BLANK1', text="")
         if group:
             col.operator("object.vertex_group_move", icon='TRIA_UP', text="").direction = 'UP'
             col.operator("object.vertex_group_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
@@ -208,7 +208,7 @@
         sub = col.column(align=True)
         sub.operator("object.shape_key_add", icon='ZOOMIN', text="").from_mix = False
         sub.operator("object.shape_key_remove", icon='ZOOMOUT', text="")
-        sub.menu("MESH_MT_shape_key_specials", icon='DOWNARROW_HLT', text="")
+        sub.menu("MESH_MT_shape_key_specials", icon='BLANK1', text="")
 
         if kb:
             col.separator()

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_material.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_material.py	2012-05-22 15:49:41 UTC (rev 46898)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_material.py	2012-05-22 15:50:13 UTC (rev 46899)
@@ -110,7 +110,7 @@
             col.operator("object.material_slot_add", icon='ZOOMIN', text="")
             col.operator("object.material_slot_remove", icon='ZOOMOUT', text="")
 
-            col.menu("MATERIAL_MT_specials", icon='DOWNARROW_HLT', text="")
+            col.menu("MATERIAL_MT_specials", icon='BLANK1', text="")
 
             if ob.mode == 'EDIT':
                 row = layout.row(align=True)

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_texture.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_texture.py	2012-05-22 15:49:41 UTC (rev 46898)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_texture.py	2012-05-22 15:50:13 UTC (rev 46899)
@@ -130,7 +130,7 @@
             col = row.column(align=True)
             col.operator("texture.slot_move", text="", icon='TRIA_UP').type = 'UP'
             col.operator("texture.slot_move", text="", icon='TRIA_DOWN').type = 'DOWN'
-            col.menu("TEXTURE_MT_specials", icon='DOWNARROW_HLT', text="")
+            col.menu("TEXTURE_MT_specials", icon='BLANK1', text="")
 
         split = layout.split(percentage=0.65)
         col = split.column()
@@ -511,7 +511,7 @@
 
         row = layout.row()
         row.prop(env, "source", expand=True)
-        row.menu("TEXTURE_MT_envmap_specials", icon='DOWNARROW_HLT', text="")
+        row.menu("TEXTURE_MT_envmap_specials", icon='BLANK1', text="")
 
         if env.source == 'IMAGE_FILE':
             layout.template_ID(tex, "image", open="image.open")

Modified: trunk/blender/source/blender/editors/interface/interface_widgets.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_widgets.c	2012-05-22 15:49:41 UTC (rev 46898)
+++ trunk/blender/source/blender/editors/interface/interface_widgets.c	2012-05-22 15:50:13 UTC (rev 46899)
@@ -161,11 +161,13 @@
 	{6, 13, 12}, {6, 12, 7}, {7, 12, 11}, {7, 11, 8}, {8, 11, 10}, {8, 10, 9}
 };
 
-static float menu_tria_vert[6][2] = {
-	{-0.41, 0.16}, {0.41, 0.16}, {0, 0.82},
-	{0, -0.82}, {-0.41, -0.16}, {0.41, -0.16}
-};
 
+static float menu_tria_vert[6][2]= {
+{-0.33, 0.16}, {0.33, 0.16}, {0, 0.82}, 
+{0, -0.82}, {-0.33, -0.16}, {0.33, -0.16}};
+
+
+
 static unsigned int menu_tria_face[2][3] = {{2, 0, 1}, {3, 5, 4}};
 
 static float check_tria_vert[6][2] = {
@@ -3126,10 +3128,18 @@
 			case MENU:
 			case BLOCK:
 			case ICONTEXTROW:
+				/* new node-link button, not active yet XXX */
 				if (but->flag & UI_BUT_NODE_LINK)
 					wt = widget_type(UI_WTYPE_MENU_NODE_LINK);
-				else if (!but->str[0] && but->icon)
-					wt = widget_type(UI_WTYPE_MENU_ICON_RADIO);
+
+				/* no text, with icon */
+				else if (!but->str[0] && but->icon) {
+					if (but->flag & UI_ICON_PREVIEW)
+						wt= widget_type(UI_WTYPE_MENU_ICON_RADIO); /* no arrows */
+					else
+						wt= widget_type(UI_WTYPE_MENU_RADIO);  /* with arrows */
+				}
+				/* with menu arrows */
 				else
 					wt = widget_type(UI_WTYPE_MENU_RADIO);
 				break;




More information about the Bf-blender-cvs mailing list