diff options
author | Ton Roosendaal <ton@blender.org> | 2012-12-23 17:02:38 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2012-12-23 17:02:38 +0400 |
commit | 60ffe9f8ec9cc30e59e2a4e65fbb6b0f5f2e3297 (patch) | |
tree | 18eb7caf260a3123277fc737174edf573edd5594 /source | |
parent | 35c0b821a5b8d13079cbdf8258391c59d7043082 (diff) |
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)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 6 |
1 files 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); } } |