diff options
author | ruslantproductengine <ruslantproductengine@lindenlab.com> | 2019-01-14 19:07:00 +0200 |
---|---|---|
committer | ruslantproductengine <ruslantproductengine@lindenlab.com> | 2019-01-14 19:07:00 +0200 |
commit | f6bccd6f9eb62178f9f3d912114d12a84a9e42d6 (patch) | |
tree | 30e31c45ac961793ea0be08cfa85ca29d271f87c /indra/llwindow | |
parent | 4f458882f4f29d441e1ba0ede1ab50aa389b2aaa (diff) |
- remove getDeviceScaleFactor() and replace it to getSystemUISize() according Ansariel note
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/llwindow.h | 3 | ||||
-rw-r--r-- | indra/llwindow/llwindowmacosx.cpp | 8 | ||||
-rw-r--r-- | indra/llwindow/llwindowmacosx.h | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index cb0daea2cd..a05ba8cbba 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -166,9 +166,6 @@ public: // Provide native key event data virtual LLSD getNativeKeyData() { return LLSD::emptyMap(); } - // Default scale - virtual float getDeviceScaleFactor() { return 1.0f; } - // Get system UI size based on DPI (for 96 DPI UI size should be 1.0) virtual F32 getSystemUISize() { return 1.0; } protected: diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 20853eebd9..b320b93d43 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1102,7 +1102,7 @@ BOOL LLWindowMacOSX::setCursorPosition(const LLCoordWindow position) // trigger mouse move callback LLCoordGL gl_pos; convertCoords(position, &gl_pos); - float scale = getDeviceScaleFactor(); + float scale = getSystemUISize(); gl_pos.mX *= scale; gl_pos.mY *= scale; mCallbacks->handleMouseMove(this, gl_pos, (MASK)0); @@ -1135,7 +1135,7 @@ BOOL LLWindowMacOSX::getCursorPosition(LLCoordWindow *position) cursor_point[1] += mCursorLastEventDeltaY; } - float scale = getDeviceScaleFactor(); + float scale = getSystemUISize(); position->mX = cursor_point[0] * scale; position->mY = cursor_point[1] * scale; @@ -1904,9 +1904,9 @@ MASK LLWindowMacOSX::modifiersToMask(S16 modifiers) return mask; } -F32 LLWindowMacOSX::getDeviceScaleFactor() +F32 LLWindowMacOSX::getSystemUISize() { - return gHiDPISupport ? ::getDeviceUnitSize(mGLView) : LLWindow::getDeviceScaleFactor(); + return gHiDPISupport ? ::getDeviceUnitSize(mGLView) : LLWindow::getSystemUISize(); } #if LL_OS_DRAGDROP_ENABLED diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index fc5c9a0054..24651027e8 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -112,7 +112,7 @@ public: /*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b); /*virtual*/ void interruptLanguageTextInput(); /*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async); - /*virtual*/ F32 getDeviceScaleFactor(); + /*virtual*/ F32 getSystemUISize(); static std::vector<std::string> getDynamicFallbackFontList(); |