summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llmaniprotate.cpp5
-rw-r--r--indra/newview/llmanipscale.cpp5
-rw-r--r--indra/newview/llmaniptranslate.cpp3
3 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 3a0f96cd37..7bd5e4cba2 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -1157,6 +1157,9 @@ BOOL LLManipRotate::updateVisiblity()
BOOL visible = FALSE;
+ //Assume that UI scale factor is equivalent for X and Y axis
+ F32 ui_scale_factor = LLUI::getScaleFactor().mV[VX];
+
LLVector3 center = gAgent.getPosAgentFromGlobal( mRotationCenter );
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
@@ -1166,6 +1169,7 @@ BOOL LLManipRotate::updateVisiblity()
mRadiusMeters = RADIUS_PIXELS / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels();
mRadiusMeters /= gAgentCamera.mHUDCurZoom;
+ mRadiusMeters *= ui_scale_factor;
mCenterToProfilePlaneMag = mRadiusMeters * mRadiusMeters / mCenterToCamMag;
mCenterToProfilePlane = -mCenterToProfilePlaneMag * mCenterToCamNorm;
@@ -1205,6 +1209,7 @@ BOOL LLManipRotate::updateVisiblity()
F32 fraction_of_fov = RADIUS_PIXELS / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels();
F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView(); // radians
mRadiusMeters = z_dist * tan(apparent_angle);
+ mRadiusMeters *= ui_scale_factor;
mCenterToProfilePlaneMag = mRadiusMeters * mRadiusMeters / mCenterToCamMag;
mCenterToProfilePlane = -mCenterToProfilePlaneMag * mCenterToCamNorm;
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;
}
}
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 3975d3980b..785022792b 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -1857,6 +1857,9 @@ void LLManipTranslate::renderTranslationHandles()
mArrowLengthMeters = 1.0f;
}
}
+ //Assume that UI scale factor is equivalent for X and Y axis
+ F32 ui_scale_factor = LLUI::getScaleFactor().mV[VX];
+ mArrowLengthMeters *= ui_scale_factor;
mPlaneManipOffsetMeters = mArrowLengthMeters * 1.8f;
mGridSizeMeters = gSavedSettings.getF32("GridDrawSize");