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:
authorCampbell Barton <ideasman42@gmail.com>2017-12-19 09:14:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-12-19 09:14:52 +0300
commit891a3762ce93e5135d07a6f04fd58408f249a558 (patch)
tree94d4e0920b370d6e7db7f40970de791bb14652d6 /source/blender/editors/manipulator_library
parent01850f0928c58bab4258c2db94057bb8101523fe (diff)
Manipulator: ui-scale support for navigate widget
Diffstat (limited to 'source/blender/editors/manipulator_library')
-rw-r--r--source/blender/editors/manipulator_library/manipulator_types/button2d_manipulator.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/manipulator_library/manipulator_types/button2d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/button2d_manipulator.c
index 32c1dbae0a6..cad97a9ef03 100644
--- a/source/blender/editors/manipulator_library/manipulator_types/button2d_manipulator.c
+++ b/source/blender/editors/manipulator_library/manipulator_types/button2d_manipulator.c
@@ -114,8 +114,8 @@ static void button3d_draw_intern(
int icon = RNA_enum_get(mpr->ptr, "icon");
if (icon != ICON_NONE) {
UI_icon_draw(
- mpr->matrix_basis[3][0] - (ICON_DEFAULT_WIDTH / 2.0) * U.pixelsize,
- mpr->matrix_basis[3][1] - (ICON_DEFAULT_HEIGHT / 2.0) * U.pixelsize,
+ mpr->matrix_basis[3][0] - (ICON_DEFAULT_WIDTH / 2.0) * U.ui_scale,
+ mpr->matrix_basis[3][1] - (ICON_DEFAULT_HEIGHT / 2.0) * U.ui_scale,
icon);
}
}
@@ -153,9 +153,8 @@ static int manipulator_button_test_select(
else {
copy_v2_v2(point_local, (float [2]){UNPACK2(event->mval)});
sub_v2_v2(point_local, mpr->matrix_basis[3]);
- mul_v2_fl(point_local, 1.0f / mpr->scale_basis);
+ mul_v2_fl(point_local, 1.0f / (mpr->scale_basis * U.ui_scale));
}
-
/* The 'mpr->scale_final' is already applied when projecting. */
if (len_squared_v2(point_local) < 1.0f) {
return 0;