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 /source/blender/editors
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.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_widgets.c22
1 files changed, 16 insertions, 6 deletions
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;