summaryrefslogtreecommitdiff
path: root/indra/newview/llmanipscale.cpp
diff options
context:
space:
mode:
authorcoyot@coyot-sager-PC <coyot@coyot-sager-PC>2017-02-28 22:56:30 +0000
committercoyot@coyot-sager-PC <coyot@coyot-sager-PC>2017-02-28 22:56:30 +0000
commit3a3da6e4a76859f32dc36491fde2992e92ae57b5 (patch)
treef61a7417ad6ffcb8488c910cfa64f14afe979071 /indra/newview/llmanipscale.cpp
parent069c938eb6ebfd77f6a415207331c66f72270e5f (diff)
parentf0b256b1cb6c96aed81ee456e505247fd2169c5f (diff)
merge
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;
}
}