Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2012-05-22 19:50:13 +0400
committerTon Roosendaal <ton@blender.org>2012-05-22 19:50:13 +0400
commit2d0c5b90179b14cd9d36807188e6cdca96e9124a (patch)
tree180ea24c676e928e1b05976913a484c284974422
parentcdba862223230ed0fd69df333296b800e156e961 (diff)
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.
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_data_mesh.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_material.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_texture.py4
-rw-r--r--source/blender/editors/interface/interface_widgets.c22
5 files changed, 22 insertions, 12 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index 6bec652045e..1b7a8f4a66e 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -130,7 +130,7 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
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'
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index 7ca464ce055..e23db7c59a1 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -149,7 +149,7 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
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 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
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()
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index 6e66bd0d98b..d2fe40fe9dc 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -110,7 +110,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
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)
diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py
index 1d5e96cf701..976684ea742 100644
--- a/release/scripts/startup/bl_ui/properties_texture.py
+++ b/release/scripts/startup/bl_ui/properties_texture.py
@@ -130,7 +130,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel):
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 @@ class TEXTURE_PT_envmap(TextureTypePanel, Panel):
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")
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 42c6bfc3870..3824dcf0724 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -161,10 +161,12 @@ static unsigned int scroll_circle_face[14][3] = {
{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}};
@@ -3126,10 +3128,18 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
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;