diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2017-01-18 18:40:09 +0200 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2017-01-18 18:40:09 +0200 |
commit | c2787beb320fc6b1aec64c32b929eaf60aff8b51 (patch) | |
tree | c805a09fbf49c9ec830e82da78818787ea7a5cff /indra | |
parent | 84a9a78124661ab3c19551343eb6ec28e0eb2a8b (diff) | |
parent | 178e11972491206e496a8b6bbd971474dbdc0812 (diff) |
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llmaniprotate.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llmanipscale.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llmaniptranslate.cpp | 3 |
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"); |