From 60ffe9f8ec9cc30e59e2a4e65fbb6b0f5f2e3297 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 23 Dec 2012 13:02:38 +0000 Subject: [PATCH] Bug fix (own collection) Icons in search menus were not drawing on the right location when UI panels were zoomed in large. Not very common, but annoying. (DPI setting worked fine) --- source/blender/editors/interface/interface_widgets.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 4687647223a..7fa5ceb5fe3 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -3467,14 +3467,14 @@ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, const char *name, int ic if (iconid) { float height, aspect; int xs = rect->xmin + 0.2f * UI_UNIT_X; - int ys = 1 + (rect->ymin + rect->ymax - UI_DPI_ICON_SIZE) / 2; + int ys = rect->ymin + 0.1f * BLI_rcti_size_y(rect); /* icons are 80% of height of button (16 pixels inside 20 height) */ height = 0.8f * BLI_rcti_size_y(rect); aspect = ICON_DEFAULT_HEIGHT / height; - + glEnable(GL_BLEND); - UI_icon_draw_aspect(xs, ys, iconid, aspect, 0.5f); /* XXX scale weak get from fstyle? */ + UI_icon_draw_aspect(xs, ys, iconid, aspect, 1.0f); /* XXX scale weak get from fstyle? */ glDisable(GL_BLEND); } }