From e3b28fddff322e39d26f369712f7237854cabd5b Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 5 Mar 2026 20:24:30 +0200 Subject: #5462 Login form update --- indra/newview/llpanellogin.cpp | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'indra/newview/llpanellogin.cpp') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 868e02f28b..77de25c28e 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -174,6 +174,19 @@ public: }; LLLoginLocationAutoHandler gLoginLocationAutoHandler; +std::string getShortGridLabel(const std::string& slurl_grid) +{ + if (slurl_grid == MAINGRID) + { + return LLTrans::getString("AgniGridLabelShort"); + } + if (slurl_grid == BETAGRID) + { + return LLTrans::getString("AditiGridLabelShort"); + } + return LLGridManager::getInstance()->getGridLabel(slurl_grid); +} + //--------------------------------------------------------------------------- // Public methods //--------------------------------------------------------------------------- @@ -221,13 +234,13 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, password_edit->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, false)); childSetAction("connect_btn", onClickConnect, this); + childSetAction("sign_btn", onClickSignUp, this); mLoginBtn = getChild("connect_btn"); setDefaultBtn(mLoginBtn); // change z sort of clickable text to be behind buttons sendChildToBack(getChildView("forgot_password_text")); - sendChildToBack(getChildView("sign_up_text")); std::string current_grid = LLGridManager::getInstance()->getGrid(); if (!mFirstLoginThisInstall) @@ -251,13 +264,13 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, if (!grid_choice->first.empty() && current_grid != grid_choice->first) { LL_DEBUGS("AppInit") << "adding " << grid_choice->first << LL_ENDL; - server_choice_combo->add(grid_choice->second, grid_choice->first); + server_choice_combo->add(getShortGridLabel(grid_choice->first), grid_choice->first); } } server_choice_combo->sortByName(); LL_DEBUGS("AppInit") << "adding current " << current_grid << LL_ENDL; - server_choice_combo->add(LLGridManager::getInstance()->getGridLabel(), + server_choice_combo->add(getShortGridLabel(current_grid), current_grid, ADD_TOP); server_choice_combo->selectFirstItem(); @@ -308,9 +321,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLTextBox* forgot_password_text = getChild("forgot_password_text"); forgot_password_text->setClickedCallback(onClickForgotPassword, NULL); - LLTextBox* sign_up_text = getChild("sign_up_text"); - sign_up_text->setClickedCallback(onClickSignUp, NULL); - // get the web browser control LLMediaCtrl* web_browser = getChild("login_html"); web_browser->addObserver(this); @@ -752,6 +762,10 @@ void LLPanelLogin::updateLocationSelectorsVisibility() { server_combo->setVisible(show_server); } + if (LLTextBox* grid_txt = sInstance->getChild("grid_text")) + { + grid_txt->setVisible(show_server); + } } } @@ -787,7 +801,7 @@ void LLPanelLogin::onUpdateStartSLURL(const LLSLURL& new_start_slurl) // update the grid selector to match the slurl LLComboBox* server_combo = sInstance->getChild("server_combo"); - std::string server_label(LLGridManager::getInstance()->getGridLabel(slurl_grid)); + std::string server_label(getShortGridLabel(slurl_grid)); server_combo->setSimple(server_label); updateServer(); // to change the links and splash screen -- cgit v1.3 From a8ba25001039afc5fadc0754c8f811e49b50b7d1 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 20 Mar 2026 18:05:42 +0200 Subject: #5557 adjust buttons position when hiding grid selector (#5559) --- indra/newview/llpanellogin.cpp | 14 ++ indra/newview/llpanellogin.h | 4 + indra/newview/skins/default/xui/en/panel_login.xml | 197 ++++++++++++--------- 3 files changed, 133 insertions(+), 82 deletions(-) (limited to 'indra/newview/llpanellogin.cpp') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 77de25c28e..6449141b8c 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -242,6 +242,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // change z sort of clickable text to be behind buttons sendChildToBack(getChildView("forgot_password_text")); + mLoginStack = getChild("login_stack"); + mGridPanel = getChild("grid_panel"); + std::string current_grid = LLGridManager::getInstance()->getGrid(); if (!mFirstLoginThisInstall) { @@ -766,6 +769,7 @@ void LLPanelLogin::updateLocationSelectorsVisibility() { grid_txt->setVisible(show_server); } + sInstance->collapseGridPanel(!show_server); } } @@ -1401,3 +1405,13 @@ bool LLPanelLogin::onUpdateNotification(const LLSD& notify) } return false; } + +void LLPanelLogin::collapseGridPanel(bool collapse) +{ + if (mGridPanel->isCollapsed() == collapse) + { + return; + } + mLoginStack->collapsePanel(mGridPanel, collapse); + mLoginStack->updateLayout(); +} diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index f527aa53ac..14528443cf 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -87,6 +87,8 @@ public: // extract name from cred in a format apropriate for username field static std::string getUserName(LLPointer &cred); + void collapseGridPanel(bool collapse); + private: friend class LLPanelLoginListener; void addFavoritesToStartLocation(); @@ -132,6 +134,8 @@ private: bool mAlertNotif; LLButton* mLoginBtn; + LLLayoutPanel* mGridPanel; + LLLayoutStack* mLoginStack; }; #endif diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 5bcd1fa0a4..ca03d2dbc5 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -208,90 +208,123 @@ name="MyHome" value="home" /> - - Grid - - - - -