From 6d7abb3f97d64d0232e6499cd1e05baa31d73e5c Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 28 Aug 2026 14:03:48 +0300 Subject: #6174 Update and simplify UI --- indra/newview/llfloatermaturitydialog.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'indra/newview/llfloatermaturitydialog.cpp') diff --git a/indra/newview/llfloatermaturitydialog.cpp b/indra/newview/llfloatermaturitydialog.cpp index c93ce88fba..afa9a70024 100644 --- a/indra/newview/llfloatermaturitydialog.cpp +++ b/indra/newview/llfloatermaturitydialog.cpp @@ -29,7 +29,6 @@ #include "llfloatermaturitydialog.h" #include "llbutton.h" -#include "llcombobox.h" #include "llagent.h" #include "lltextbox.h" #include "llviewercontrol.h" @@ -43,10 +42,6 @@ LLFloaterMaturityDialog::LLFloaterMaturityDialog(const LLSD& key) bool LLFloaterMaturityDialog::postBuild() { setCanDrag(false); - LLComboBox* combo = getChild("maturity_combo"); - combo->setCommitCallback([this](LLUICtrl*, const LLSD&) { updateContinueButton(); }); - // Ensure the dropdown list renders on top of buttons and labels below the combo - sendChildToFront(combo); getChild("continue_btn")->setCommitCallback( [this](LLUICtrl*, const LLSD&) { onContinue(); }); getChild("cancel_btn")->setCommitCallback( @@ -59,33 +54,33 @@ void LLFloaterMaturityDialog::onOpen(const LLSD& key) { LLModalDialog::onOpen(key); - mPreviousMaturity = gSavedSettings.getU32("PreferredMaturity"); mRegionAccess = static_cast(key.asInteger()); LLStringUtil::format_map_t args; args["[MATURITY]"] = LLViewerRegion::accessToString(mRegionAccess); getChild("location_rated_lbl")->setText(getString("location_rated_string", args)); - getChild("include_adult_lbl")->setText(getString("update_maturity_string", args)); + getChild("current_maturity_lbl")->setText(getString("update_maturity_string", args)); + getChild("continue_btn")->setLabel(getString("allow_maturity_string", args)); - updateContinueButton(); centerOnScreen(); } +void LLFloaterMaturityDialog::draw() +{ + // Skip floater shadow/background; icon child provides the visual background + LLView::draw(); +} + void LLFloaterMaturityDialog::onContinue() { + gSavedSettings.setU32("PreferredMaturity", static_cast(mRegionAccess)); gAgent.restartFailedTeleportRequest(); closeFloater(); } void LLFloaterMaturityDialog::onCancel() { - gSavedSettings.setU32("PreferredMaturity", mPreviousMaturity); gAgent.clearTeleportRequest(); closeFloater(); } -void LLFloaterMaturityDialog::updateContinueButton() -{ - U32 current = gSavedSettings.getU32("PreferredMaturity"); - getChild("continue_btn")->setEnabled(current >= mRegionAccess); -} -- cgit v1.3