summaryrefslogtreecommitdiff
path: root/indra/newview/llmanipscale.cpp
diff options
context:
space:
mode:
authorpavelkproductengine <pavelkproductengine@lindenlab.com>2017-01-04 20:27:32 +0200
committerpavelkproductengine <pavelkproductengine@lindenlab.com>2017-01-04 20:27:32 +0200
commit178e11972491206e496a8b6bbd971474dbdc0812 (patch)
tree3a670788778d12271a757d8bf85e75ea545128a6 /indra/newview/llmanipscale.cpp
parentb65e54d1028a0cfa42589d7dc590384ceedf5cac (diff)
MAINT-7014 [MAINT-RC] Edit arrows are too small with 4k monitor
Diffstat (limited to 'indra/newview/llmanipscale.cpp')
-rw-r--r--indra/newview/llmanipscale.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 3cbe742e3c..8b2ac4f303 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -228,12 +228,16 @@ void LLManipScale::render()
const F32 BOX_HANDLE_BASE_SIZE = 50.0f; // box size in pixels = BOX_HANDLE_BASE_SIZE * BOX_HANDLE_BASE_FACTOR
const F32 BOX_HANDLE_BASE_FACTOR = 0.2f;
+ //Assume that UI scale factor is equivalent for X and Y axis
+ F32 ui_scale_factor = LLUI::getScaleFactor().mV[VX];
+
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
for (S32 i = 0; i < NUM_MANIPULATORS; i++)
{
mBoxHandleSize[i] = BOX_HANDLE_BASE_SIZE * BOX_HANDLE_BASE_FACTOR / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels();
mBoxHandleSize[i] /= gAgentCamera.mHUDCurZoom;
+ mBoxHandleSize[i] *= ui_scale_factor;
}
}
else
@@ -266,6 +270,7 @@ void LLManipScale::render()
// range == zero
mBoxHandleSize[i] = BOX_HANDLE_BASE_FACTOR;
}
+ mBoxHandleSize[i] *= ui_scale_factor;
}
}