From 4e5b6eab4ff073122a179ceafdaffcd6652763b6 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 1 Oct 2026 18:30:56 +0300 Subject: Show scrollbar in Join floater when the viewer window is too small --- indra/newview/llfloaterjoin.cpp | 18 +++ indra/newview/llfloaterjoin.h | 3 + .../newview/skins/default/xui/en/floater_join.xml | 138 ++++++++++++--------- 3 files changed, 101 insertions(+), 58 deletions(-) diff --git a/indra/newview/llfloaterjoin.cpp b/indra/newview/llfloaterjoin.cpp index a37fd60cb1..4fab555753 100644 --- a/indra/newview/llfloaterjoin.cpp +++ b/indra/newview/llfloaterjoin.cpp @@ -85,13 +85,31 @@ LLFloaterJoin::LLFloaterJoin(const LLSD& key) bool LLFloaterJoin::postBuild() { mWebBrowser = getChild("join_browser"); + mNativeRect = getRect(); return true; } +void LLFloaterJoin::updateFloaterSize() +{ + const LLRect& screen_rect = gFloaterView->getRect(); + S32 width = llmin(mNativeRect.getWidth(), screen_rect.getWidth()); + S32 height = llmin(mNativeRect.getHeight(), screen_rect.getHeight()); + + // Shrink the floater to fit the screen, letting scroll container reveal the rest if + // the screen is currently smaller than the floater's native size, else restore it + if (width != getRect().getWidth() || height != getRect().getHeight()) + { + reshape(width, height); + center(); + } +} + void LLFloaterJoin::draw() { static LLCachedControl overlay_opacity(gSavedSettings, "JoinFloaterOverlayOpacity"); + updateFloaterSize(); + // As a modal dialog this floater is drawn twice per frame (once by LLFloaterView and once // by LLPopupView), so paint the overlay only on the first pass of each frame U32 frame_count = LLFrameTimer::getFrameCount(); diff --git a/indra/newview/llfloaterjoin.h b/indra/newview/llfloaterjoin.h index 8b69292f9d..5922a45e85 100644 --- a/indra/newview/llfloaterjoin.h +++ b/indra/newview/llfloaterjoin.h @@ -42,7 +42,10 @@ private: LLFloaterJoin(const LLSD& key); ~LLFloaterJoin() = default; + void updateFloaterSize(); + LLMediaCtrl* mWebBrowser = nullptr; U32 mOverlayFrame = 0; + LLRect mNativeRect; }; diff --git a/indra/newview/skins/default/xui/en/floater_join.xml b/indra/newview/skins/default/xui/en/floater_join.xml index 4b9d3a64bd..a3a6ea216a 100644 --- a/indra/newview/skins/default/xui/en/floater_join.xml +++ b/indra/newview/skins/default/xui/en/floater_join.xml @@ -15,15 +15,91 @@ can_close="false" positioning="centered" save_rect="false"> - + + name="join_scroll" + opaque="false" + border_visible="false" + mouse_opaque="false"> + + + + + + secondlife:///app/floaterjoin/close + + + secondlife:///app/floaterjoin/join/testuser/testpassword + + + secondlife:///app/floaterjoin/tos + + + secondlife:///app/floaterjoin/tc + + + - - - - secondlife:///app/floaterjoin/close - - - secondlife:///app/floaterjoin/join/testuser/testpassword - - - secondlife:///app/floaterjoin/tos - - - secondlife:///app/floaterjoin/tc - -- cgit v1.3