diff options
author | Ton Roosendaal <ton@blender.org> | 2009-06-04 19:19:48 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-06-04 19:19:48 +0400 |
commit | 33b0ba4a76b4f772aad6e0cdecb75806a1f092d7 (patch) | |
tree | 3d71a8980824ce4413914ff8492d547f8b17e270 /source | |
parent | 59333375b31fe4ba055f875c1d42be10e1611249 (diff) |
2.5
Bugfix: Icons were drawing on wrong subpixel positions, distorting
badly. Now it's crispy and tasty!
Noticed there's a magnifier icon already, using it for the search
option.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 23 | ||||
-rw-r--r-- | source/blender/editors/space_info/info_header.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 2 |
3 files changed, 14 insertions, 13 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 628efa220ed..c0d788ef0a9 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -630,7 +630,8 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) static void widget_draw_icon(uiBut *but, BIFIconID icon, int blend, rcti *rect) { - float xs=0, ys=0, aspect, height; + int xs=0, ys=0; + float aspect, height; /* this icon doesn't need draw... */ if(icon==ICON_BLANK1 && (but->flag & UI_ICON_SUBMENU)==0) return; @@ -663,33 +664,33 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, int blend, rcti *rect) if(but->flag & UI_ICON_LEFT) { if (but->type==BUT_TOGDUAL) { if (but->drawstr[0]) { - xs= rect->xmin-1.0; + xs= rect->xmin-1; } else { - xs= (rect->xmin+rect->xmax- height)/2.0; + xs= (rect->xmin+rect->xmax- height)/2; } } else if (but->block->flag & UI_BLOCK_LOOP) { - xs= rect->xmin+1.0; + xs= rect->xmin+1; } else if ((but->type==ICONROW) || (but->type==ICONTEXTROW)) { - xs= rect->xmin+3.0; + xs= rect->xmin+3; } else { - xs= rect->xmin+4.0; + xs= rect->xmin+4; } - ys= (rect->ymin+rect->ymax- height)/2.0; + ys= (rect->ymin+rect->ymax- height)/2; } else { - xs= (rect->xmin+rect->xmax- height)/2.0; - ys= (rect->ymin+rect->ymax- height)/2.0; + xs= (rect->xmin+rect->xmax- height)/2; + ys= (rect->ymin+rect->ymax- height)/2; } UI_icon_draw_aspect_blended(xs, ys, icon, aspect, blend); } if(but->flag & UI_ICON_SUBMENU) { - xs= rect->xmax-17.0; - ys= (rect->ymin+rect->ymax- height)/2.0; + xs= rect->xmax-17; + ys= (rect->ymin+rect->ymax- height)/2; UI_icon_draw_aspect_blended(xs, ys, ICON_RIGHTARROW_THIN, aspect, blend); } diff --git a/source/blender/editors/space_info/info_header.c b/source/blender/editors/space_info/info_header.c index 09f5640dbf6..c8dd3df8425 100644 --- a/source/blender/editors/space_info/info_header.c +++ b/source/blender/editors/space_info/info_header.c @@ -489,7 +489,7 @@ void info_header_buttons(const bContext *C, ARegion *ar) { static char search[256]= ""; - uiBut *but= uiDefSearchBut(block, search, 0, ICON_PROP_ON, 256, xco+5, yco, 120, 19, ""); + uiBut *but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, 256, xco+5, yco, 120, 19, ""); uiButSetSearchFunc(but, operator_search_cb, NULL, operator_call_cb); diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index b020e4c24a8..418a231a7e9 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -420,7 +420,7 @@ static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *arg_op) block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS); uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_RET_1); - but= uiDefSearchBut(block, search, 0, ICON_PROP_ON, 256, 10, 10, 180, 19, ""); + but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, 256, 10, 10, 180, 19, ""); uiButSetSearchFunc(but, operator_search_cb, NULL, operator_call_cb); uiPopupBoundsBlock(block, 0.0f, 0, -20); /* move it downwards, mouse over button */ |