summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2026-10-01 18:30:56 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2026-10-01 18:30:56 +0300
commit4e5b6eab4ff073122a179ceafdaffcd6652763b6 (patch)
tree5f28b61d726f72b02855f683c8602d6203722d3b
parent7f3c72b84d2699b1ba8b0fcb5b1d38398bb9d0a8 (diff)
Show scrollbar in Join floater when the viewer window is too small
-rw-r--r--indra/newview/llfloaterjoin.cpp18
-rw-r--r--indra/newview/llfloaterjoin.h3
-rw-r--r--indra/newview/skins/default/xui/en/floater_join.xml138
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<LLMediaCtrl>("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<F32> 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">
- <web_browser
+ <!-- web_browser is wrapped in a scroll container so it stays reachable via scrollbars if the viewer window is too small-->
+ <scroll_container
follows="all"
left="0"
top="0"
right="-1"
bottom="-1"
- name="join_browser"
- trusted_content="false"
- border_visible="false" />
+ name="join_scroll"
+ opaque="false"
+ border_visible="false"
+ mouse_opaque="false">
+ <panel
+ follows="left|top"
+ left="0"
+ top="0"
+ width="1024"
+ height="768"
+ name="web_panel"
+ background_visible="false"
+ mouse_opaque="false">
+ <web_browser
+ follows="all"
+ left="0"
+ top="0"
+ right="-1"
+ bottom="-1"
+ name="join_browser"
+ trusted_content="false"
+ border_visible="false" />
+
+ <!-- TODO: remove when actual Join page URL is set -->
+ <text
+ follows="right|bottom"
+ name="test_close_link"
+ visible="false"
+ parse_urls="true"
+ font="SansSerifSmall"
+ text_color="White"
+ left="758"
+ top="748"
+ width="262"
+ height="16">
+ secondlife:///app/floaterjoin/close
+ </text>
+ <text
+ follows="left|bottom"
+ name="test_join_link"
+ visible="false"
+ parse_urls="true"
+ font="SansSerifSmall"
+ text_color="White"
+ left="4"
+ top="748"
+ width="430"
+ height="16">
+ secondlife:///app/floaterjoin/join/testuser/testpassword
+ </text>
+ <text
+ follows="left|bottom"
+ name="test_tos_link"
+ visible="false"
+ parse_urls="true"
+ font="SansSerifSmall"
+ text_color="White"
+ left="4"
+ top="728"
+ width="430"
+ height="16">
+ secondlife:///app/floaterjoin/tos
+ </text>
+ <text
+ follows="left|bottom"
+ name="test_tc_link"
+ visible="false"
+ parse_urls="true"
+ font="SansSerifSmall"
+ text_color="White"
+ left="4"
+ top="708"
+ width="430"
+ height="16">
+ secondlife:///app/floaterjoin/tc
+ </text>
+ </panel>
+ </scroll_container>
<view_border
follows="all"
left="0"
@@ -35,58 +111,4 @@
highlight_light_color="White"
mouse_opaque="false"
name="floater_outline" />
-
- <!-- TODO: remove when actual Join page URL is set -->
- <text
- follows="right|bottom"
- name="test_close_link"
- visible="false"
- parse_urls="true"
- font="SansSerifSmall"
- text_color="White"
- left="758"
- top="748"
- width="262"
- height="16">
- secondlife:///app/floaterjoin/close
- </text>
- <text
- follows="left|bottom"
- name="test_join_link"
- visible="false"
- parse_urls="true"
- font="SansSerifSmall"
- text_color="White"
- left="4"
- top="748"
- width="430"
- height="16">
- secondlife:///app/floaterjoin/join/testuser/testpassword
- </text>
- <text
- follows="left|bottom"
- name="test_tos_link"
- visible="false"
- parse_urls="true"
- font="SansSerifSmall"
- text_color="White"
- left="4"
- top="728"
- width="430"
- height="16">
- secondlife:///app/floaterjoin/tos
- </text>
- <text
- follows="left|bottom"
- name="test_tc_link"
- visible="false"
- parse_urls="true"
- font="SansSerifSmall"
- text_color="White"
- left="4"
- top="708"
- width="430"
- height="16">
- secondlife:///app/floaterjoin/tc
- </text>
</floater>