Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-28 17:00:41 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-28 17:16:04 +0300
commitbf75b248180e5f7411fa27cdc89d7d1f07f7735c (patch)
treeda65daaeca12492bff371a190db78b29947c991c /source/blender/windowmanager
parent61759f3b5554b808c6e27591416064ead42a0fc9 (diff)
UI: fix incorrect scaling of manipulator widgets with DPI.
U.ui_scale is the setting from the user preferences and should never be used for drawing. UI_DPI_FAC is the final scale after DPI from the operating system is taken into account.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/manipulators/intern/wm_manipulator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
index 3a78dd32f94..856b92096dd 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
@@ -53,6 +53,8 @@
#include "ED_screen.h"
#include "ED_view3d.h"
+#include "UI_interface.h"
+
#ifdef WITH_PYTHON
#include "BPY_extern.h"
#endif
@@ -470,7 +472,7 @@ bool wm_manipulator_select_and_highlight(bContext *C, wmManipulatorMap *mmap, wm
void wm_manipulator_calculate_scale(wmManipulator *mpr, const bContext *C)
{
const RegionView3D *rv3d = CTX_wm_region_view3d(C);
- float scale = U.ui_scale;
+ float scale = UI_DPI_FAC;
if ((mpr->parent_mgroup->type->flag & WM_MANIPULATORGROUPTYPE_SCALE) == 0) {
scale *= U.manipulator_size;