From f6bccd6f9eb62178f9f3d912114d12a84a9e42d6 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 14 Jan 2019 19:07:00 +0200 Subject: - remove getDeviceScaleFactor() and replace it to getSystemUISize() according Ansariel note --- indra/llwindow/llwindow.h | 3 --- indra/llwindow/llwindowmacosx.cpp | 8 ++++---- indra/llwindow/llwindowmacosx.h | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'indra/llwindow') 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 getDynamicFallbackFontList(); -- cgit v1.2.3