diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index dc1c085c88f227f98303730c5580b38c6c9db1af..73fbe78b0ce5a2111748baff1fa2116f7e2bab9b 100644 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -123,7 +123,7 @@ void LLDebugView::draw() { if (mFloaterSnapRegion == NULL) { - mFloaterSnapRegion = getRootView()->getChildView("floater_snap_region"); + mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion(); } LLRect debug_rect; diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index 38aaa1e83640ba93e458dd5607acd50a20afa34b..6753c03704164cd7a348f19a1d5e3e6c04b7b6cd 100644 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -293,7 +293,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) if (mFloaterSnapRegion == NULL) { - mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region"); + mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion(); } LLRect channel_rect; mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &channel_rect, gFloaterView); @@ -384,7 +384,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts() if (mFloaterSnapRegion == NULL) { - mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region"); + mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion(); } if (!getParent()) diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 67ce8c64de377fa0af6109aea6f5d811218da069..49f15540fe169be6fc7ba28228b53a735ebaac8e 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -195,7 +195,7 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate } } - bool use_freeze_frame = floaterp->getChild<LLUICtrl>("freeze_frame_check")->getValue().asBoolean(); + bool use_freeze_frame = floaterp->mFreezeFrameCheck->getValue().asBoolean(); if (use_freeze_frame) { @@ -994,8 +994,9 @@ BOOL LLFloaterSnapshot::postBuild() getChild<LLUICtrl>("layer_types")->setValue("colors"); getChildView("layer_types")->setEnabled(FALSE); - getChild<LLUICtrl>("freeze_frame_check")->setValue(gSavedSettings.getBOOL("UseFreezeFrame")); - childSetCommitCallback("freeze_frame_check", ImplBase::onCommitFreezeFrame, this); + mFreezeFrameCheck = getChild<LLUICtrl>("freeze_frame_check"); + mFreezeFrameCheck->setValue(gSavedSettings.getBOOL("UseFreezeFrame")); + mFreezeFrameCheck->setCommitCallback(&ImplBase::onCommitFreezeFrame, this); getChild<LLUICtrl>("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot")); childSetCommitCallback("auto_snapshot_check", ImplBase::onClickAutoSnap, this); @@ -1003,6 +1004,7 @@ BOOL LLFloaterSnapshot::postBuild() getChild<LLButton>("retract_btn")->setCommitCallback(boost::bind(&LLFloaterSnapshot::onExtendFloater, this)); getChild<LLButton>("extend_btn")->setCommitCallback(boost::bind(&LLFloaterSnapshot::onExtendFloater, this)); + getChild<LLTextBox>("360_label")->setSoundFlags(LLView::MOUSE_UP); getChild<LLTextBox>("360_label")->setShowCursorHand(false); getChild<LLTextBox>("360_label")->setClickedCallback(boost::bind(&LLFloaterSnapshot::on360Snapshot, this)); diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index efc711758ca16d257b5329b7cec93bbeba457ac1..541931cfd5ca0e44f3e6816a9ee5439756269794 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -35,6 +35,7 @@ class LLSpinCtrl; class LLSnapshotLivePreview; class LLToolset; +class LLTextBox; class LLFloaterSnapshotBase : public LLFloater { @@ -72,6 +73,8 @@ class LLFloaterSnapshotBase : public LLFloater LLUICtrl* mThumbnailPlaceholder; LLUICtrl *mRefreshBtn, *mRefreshLabel; LLUICtrl *mSucceessLblPanel, *mFailureLblPanel; + LLUICtrl* mFreezeFrameCheck = nullptr; + LLTextBox* m360Label = nullptr; }; class LLFloaterSnapshotBase::ImplBase diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index d466275ae17f010ead2633cc9a04f31d7c926fc4..19fc3daef6a9fa3120094cbfbf08b2e444d8a84f 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -53,19 +53,21 @@ LLRect LLScreenChannelBase::getChannelRect() { LL_PROFILE_ZONE_SCOPED; + LLRect channel_rect; + LLRect chiclet_rect; + if (mFloaterSnapRegion == NULL) { - mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region"); + mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion(); + //if(!mFloaterSnapRegion) mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region"); } if (mChicletRegion == NULL) { - mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container"); + mChicletRegion = gViewerWindow->getChicletContainer(); + //if(!mChicletRegion) mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container"); } - LLRect channel_rect; - LLRect chiclet_rect; - mFloaterSnapRegion->localRectToScreen(mFloaterSnapRegion->getLocalRect(), &channel_rect); mChicletRegion->localRectToScreen(mChicletRegion->getLocalRect(), &chiclet_rect); @@ -103,12 +105,12 @@ BOOL LLScreenChannelBase::postBuild() { if (mFloaterSnapRegion == NULL) { - mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region"); + mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion(); } if (mChicletRegion == NULL) { - mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container"); + mChicletRegion = gViewerWindow->getChicletContainer(); } return TRUE; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 6b22e5c8204fee8c4600e8838a084229bcee70f8..4a9da036a411305ec8df13e44c32ba22ebc85952 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2183,7 +2183,9 @@ void LLViewerWindow::initBase() toolbarp->getCenterLayoutPanel()->setReshapeCallback(boost::bind(&LLFloaterView::setToolbarRect, gFloaterView, _1, _2)); } } - gFloaterView->setFloaterSnapView(main_view->getChild<LLView>("floater_snap_region")->getHandle()); + mChicletContainer = getRootView()->getChild<LLPanel>("chiclet_container"); + mFloaterSnapRegion = main_view->getChild<LLView>("floater_snap_region"); + gFloaterView->setFloaterSnapView(mFloaterSnapRegion->getHandle()); gSnapshotFloaterView = main_view->getChild<LLSnapshotFloaterView>("Snapshot Floater View"); // Console @@ -2247,12 +2249,11 @@ void LLViewerWindow::initWorldUI() if (!gNonInteractive) { - LLPanel* chiclet_container = getRootView()->getChild<LLPanel>("chiclet_container"); LLChicletBar* chiclet_bar = LLChicletBar::getInstance(); - chiclet_bar->setShape(chiclet_container->getLocalRect()); + chiclet_bar->setShape(mChicletContainer->getLocalRect()); chiclet_bar->setFollowsAll(); - chiclet_container->addChild(chiclet_bar); - chiclet_container->setVisible(TRUE); + mChicletContainer->addChild(chiclet_bar); + mChicletContainer->setVisible(TRUE); } LLRect morph_view_rect = full_window; diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 08c9e8a0b4a7c818751721eb1e8ec8f5af318171..ada10a35dbc65cd85e8795c72ff2d6e66fbfeccb 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -435,6 +435,9 @@ class LLViewerWindow final : public LLWindowCallbacks static std::string getLastSnapshotDir(); + LLPanel* getChicletContainer() { return mChicletContainer; } + LLView* getFloaterSnapRegion() { return mFloaterSnapRegion; } + private: bool shouldShowToolTipFor(LLMouseHandler *mh); @@ -506,6 +509,8 @@ class LLViewerWindow final : public LLWindowCallbacks LLHandle<LLView> mLoginPanelHolder; // container for login panel LLPopupView* mPopupView; // container for transient popups + LLView* mFloaterSnapRegion = nullptr; + LLPanel* mChicletContainer = nullptr; LLPanel* mStatusBarContainer = nullptr; LLView* mNavBarBarContainer = nullptr;