From 6b2af22d37dc1a039104f2ca0b3b4b56aca7d41c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 18 Dec 2012 20:00:52 +0000 Subject: DPI: fix wrong scaling of editor type choosing buttons, and for menu arrows overlapping or being too close to icons in small buttons. --- source/blender/editors/interface/interface_widgets.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'source/blender/editors/interface') diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index f003889464e..e5b26148be5 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -566,19 +566,14 @@ static void widget_trias_draw(uiWidgetTrias *tria) static void widget_menu_trias(uiWidgetTrias *tria, const rcti *rect) { - float centx, centy, size, asp; + float centx, centy, size; int a; /* center position and size */ - centx = rect->xmax - 0.5f * BLI_rcti_size_y(rect); - centy = rect->ymin + 0.5f * BLI_rcti_size_y(rect); + centx = rect->xmax - 0.32f * BLI_rcti_size_y(rect); + centy = rect->ymin + 0.50f * BLI_rcti_size_y(rect); size = 0.4f * (float)BLI_rcti_size_y(rect); - /* XXX exception */ - asp = ((float)BLI_rcti_size_x(rect)) / ((float)BLI_rcti_size_y(rect)); - if (asp > 1.2f && asp < 2.6f) - centx = rect->xmax - 0.4f * (float)BLI_rcti_size_y(rect); - for (a = 0; a < 6; a++) { tria->vec[a][0] = size * menu_tria_vert[a][0] + centx; tria->vec[a][1] = size * menu_tria_vert[a][1] + centy; -- cgit v1.2.3