[Bf-blender-cvs] [2d03edb] master: Fix T49631: radial control operators not using DPI properly.
Brecht Van Lommel
noreply at git.blender.org
Wed Oct 12 20:26:47 CEST 2016
Commit: 2d03edb458bda6f2d3b84ede0d49f8e7b78594f7
Author: Brecht Van Lommel
Date: Wed Oct 12 20:15:38 2016 +0200
Branches: master
https://developer.blender.org/rB2d03edb458bda6f2d3b84ede0d49f8e7b78594f7
Fix T49631: radial control operators not using DPI properly.
===================================================================
M source/blender/windowmanager/intern/wm_operators.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 87ef059..b9fd4d2 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2872,8 +2872,8 @@ void WM_OT_straightline_gesture(wmOperatorType *ot)
/* *********************** radial control ****************** */
-#define WM_RADIAL_CONTROL_DISPLAY_SIZE (200)
-#define WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE (35)
+#define WM_RADIAL_CONTROL_DISPLAY_SIZE (200 * UI_DPI_FAC)
+#define WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE (35 * UI_DPI_FAC)
#define WM_RADIAL_CONTROL_DISPLAY_WIDTH (WM_RADIAL_CONTROL_DISPLAY_SIZE - WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE)
#define WM_RADIAL_MAX_STR 10
@@ -3150,7 +3150,7 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd
if (rmin > 0.0f)
glutil_draw_lined_arc(0.0, (float)(M_PI * 2.0), rmin, 40);
- BLF_size(fontid, 1.5 * fstyle_points, 1.0f / U.dpi);
+ BLF_size(fontid, 1.5 * fstyle_points * U.pixelsize, U.dpi);
BLF_enable(fontid, BLF_SHADOW);
BLF_shadow(fontid, 3, (const float[4]){0.0f, 0.0f, 0.0f, 0.5f});
BLF_shadow_offset(fontid, 1, -1);
More information about the Bf-blender-cvs
mailing list