Commit 724e3cca authored by AndreyL ProductEngine's avatar AndreyL ProductEngine
Browse files

SL-10891 Reset UI scale factor on first run if OS's display scaling is not 100%

parent d1b64905
......@@ -222,6 +222,7 @@ Ansariel Hiller
MAINT-8085
MAINT-8723
SL-10385
SL-10891
Aralara Rajal
Arare Chantilly
CHUIBUG-191
......
......@@ -16288,6 +16288,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>ResetUIScaleOnFirstRun</key>
<map>
<key>Comment</key>
<string>Resets the UI scale factor on first run due to changed display scaling behavior</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
</map>
</llsd>
......@@ -1763,6 +1763,16 @@ LLViewerWindow::LLViewerWindow(const Params& p)
LLCoordScreen scr;
mWindow->getSize(&scr);
// Reset UI scale factor on first run if OS's display scaling is not 100%
if (gSavedSettings.getBOOL("ResetUIScaleOnFirstRun"))
{
if (mWindow->getSystemUISize() != 1.f)
{
gSavedSettings.setF32("UIScaleFactor", 1.f);
}
gSavedSettings.setBOOL("ResetUIScaleOnFirstRun", FALSE);
}
// Get the real window rect the window was created with (since there are various OS-dependent reasons why
// the size of a window or fullscreen context may have been adjusted slightly...)
F32 ui_scale_factor = llclamp(gSavedSettings.getF32("UIScaleFactor"), MIN_UI_SCALE, MAX_UI_SCALE) * mWindow->getSystemUISize();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment