Feature Request: Add LiruResizeRootWithScreen to prevent ui getting messed up when the window is resized

This is not complete, and it should only be used if you know what you're getting into.
This commit is contained in:
Inusaito Sayori
2014-09-03 08:08:59 -04:00
parent 4cbcaba7f2
commit 56f2e20cb4
2 changed files with 12 additions and 0 deletions

View File

@@ -808,6 +808,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>LiruResizeRootWithScreen</key>
<map>
<key>Comment</key>
<string>When false, the ui view won't resize when the screen does (floaters won't move around without user interaction, but they also might be restricted from moving everywhere).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>LiruLegacyScrollToEnd</key>
<map>
<key>Comment</key>

View File

@@ -2399,6 +2399,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
// Inform lower views of the change
// round up when converting coordinates to make sure there are no gaps at edge of window
LLView::sForceReshape = display_scale_changed;
if (/*display_scale_changed && */gSavedSettings.getBOOL("LiruResizeRootWithScreen")) // Singu Note: Nasty hack to keep floaters from repositioning on window resize.
mRootView->reshape(llceil((F32)width / mDisplayScale.mV[VX]), llceil((F32)height / mDisplayScale.mV[VY]));
LLView::sForceReshape = FALSE;