forked from bartvdbraak/blender
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.
This commit is contained in:
parent
cdba862223
commit
2d0c5b9017
@ -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'
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
|
@ -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")
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user