diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-11-21 21:25:13 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-11-21 21:31:20 +0300 |
commit | 0a3cf083641121765fc78277f00d89af6d2cfebc (patch) | |
tree | 7ffccf7abc783f9e43119c166fb15fafc9fd9b14 /source/blender/editors/interface/interface_widgets.c | |
parent | e8b9ff78dcb5e8e4dcf8f3383f9e8c55a8533b17 (diff) |
Keymaps: take into account DPI for tweak/drag/pie thresholds.
The intention is to fix a too low default threshold on high DPI screen.
Users with high DPI screens that have increased the threshold to fix this
or liked the lower threshold will need to lower it again.
This is still somewhat of a guess, ideally this would be based on the
physical distance travalled, and maybe different per type of input device.
However we do not have access to this information, and hope this gives a
better default.
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index ea588c703c6..0ffc40bdf9d 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -4566,8 +4566,8 @@ void ui_draw_pie_center(uiBlock *block) float *pie_dir = block->pie_data.pie_dir; - float pie_radius_internal = U.pixelsize * U.pie_menu_threshold; - float pie_radius_external = U.pixelsize * (U.pie_menu_threshold + 7.0f); + float pie_radius_internal = U.dpi_fac * U.pie_menu_threshold; + float pie_radius_external = U.dpi_fac * (U.pie_menu_threshold + 7.0f); int subd = 40; @@ -4609,8 +4609,8 @@ void ui_draw_pie_center(uiBlock *block) immUnbindProgram(); if (U.pie_menu_confirm > 0 && !(block->pie_data.flags & (UI_PIE_INVALID_DIR | UI_PIE_CLICK_STYLE))) { - float pie_confirm_radius = U.pixelsize * (pie_radius_internal + U.pie_menu_confirm); - float pie_confirm_external = U.pixelsize * (pie_radius_internal + U.pie_menu_confirm + 7.0f); + float pie_confirm_radius = U.dpi_fac * (pie_radius_internal + U.pie_menu_confirm); + float pie_confirm_external = U.dpi_fac * (pie_radius_internal + U.pie_menu_confirm + 7.0f); const char col[4] = {btheme->tui.wcol_pie_menu.text_sel[0], btheme->tui.wcol_pie_menu.text_sel[1], |