summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/lluictrl.cpp4
-rw-r--r--indra/llui/lluictrl.h5
-rw-r--r--indra/newview/llcallfloater.cpp12
-rw-r--r--indra/newview/llcallfloater.h1
-rw-r--r--indra/newview/llfloatercamera.cpp1
-rw-r--r--indra/newview/llmoveview.cpp1
-rw-r--r--indra/newview/llnearbychathandler.cpp39
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp6
-rw-r--r--indra/newview/llpanelpicks.cpp15
-rw-r--r--indra/newview/llpanelpicks.h1
-rw-r--r--indra/newview/llpanelprofile.cpp16
-rw-r--r--indra/newview/lltoast.cpp5
-rw-r--r--indra/newview/lltoast.h12
13 files changed, 100 insertions, 18 deletions
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 7e4cb78d80..afd60cbb3e 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -944,6 +944,10 @@ F32 LLUICtrl::getCurrentTransparency()
case TT_INACTIVE:
alpha = sInactiveControlTransparency;
break;
+
+ case TT_FADING:
+ alpha = sInactiveControlTransparency / 2;
+ break;
}
return alpha;
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index a78f98ac76..b37e9f6b1b 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -123,8 +123,9 @@ public:
enum ETypeTransparency
{
TT_DEFAULT,
- TT_ACTIVE,
- TT_INACTIVE
+ TT_ACTIVE, // focused floater
+ TT_INACTIVE, // other floaters
+ TT_FADING, // fading toast
};
/*virtual*/ ~LLUICtrl();
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index b2e9564f7d..328c326278 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -167,6 +167,7 @@ BOOL LLCallFloater::postBuild()
//chrome="true" hides floater caption
if (mDragHandle)
mDragHandle->setTitleVisible(TRUE);
+ updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
updateSession();
@@ -206,6 +207,17 @@ void LLCallFloater::draw()
}
// virtual
+void LLCallFloater::setFocus( BOOL b )
+{
+ LLTransientDockableFloater::setFocus(b);
+
+ // Force using active floater transparency (STORM-730).
+ // We have to override setFocus() for LLCallFloater because selecting an item
+ // of the voice morphing combobox causes the floater to lose focus and thus become transparent.
+ updateTransparency(TT_ACTIVE);
+}
+
+// virtual
void LLCallFloater::onParticipantsChanged()
{
if (NULL == mParticipants) return;
diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index 3bc7043353..00a3f76e56 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -64,6 +64,7 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void draw();
+ /*virtual*/ void setFocus( BOOL b );
/**
* Is called by LLVoiceClient::notifyParticipantObservers when voice participant list is changed.
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index ad24c6534a..90a9879949 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -343,6 +343,7 @@ BOOL LLFloaterCamera::postBuild()
{
setIsChrome(TRUE);
setTitleVisible(TRUE); // restore title visibility after chrome applying
+ updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
mRotate = getChild<LLJoystickCameraRotate>(ORBIT);
mZoom = findChild<LLPanelCameraZoom>(ZOOM);
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index d38bb5aa4a..89d551f129 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -94,6 +94,7 @@ BOOL LLFloaterMove::postBuild()
{
setIsChrome(TRUE);
setTitleVisible(TRUE); // restore title visibility after chrome applying
+ updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
LLDockableFloater::postBuild();
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index d2ad78f140..dfbbaa0941 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -165,11 +165,20 @@ public:
: LLToast(p),
mNearbyChatScreenChannelp(nc_channelp)
{
+ updateTransparency();
+ setMouseEnterCallback(boost::bind(&LLNearbyChatToast::updateTransparency, this));
+ setMouseLeaveCallback(boost::bind(&LLNearbyChatToast::updateTransparency, this));
}
/*virtual*/ void onClose(bool app_quitting);
+ /*virtual*/ void setBackgroundOpaque(BOOL b);
+
+protected:
+ /*virtual*/ void setTransparentState(bool transparent);
private:
+ void updateTransparency();
+
LLNearbyChatScreenChannel* mNearbyChatScreenChannelp;
};
@@ -597,4 +606,34 @@ void LLNearbyChatToast::onClose(bool app_quitting)
mNearbyChatScreenChannelp->onToastDestroyed(this, app_quitting);
}
+// virtual
+void LLNearbyChatToast::setBackgroundOpaque(BOOL b)
+{
+ // We don't want background changes: transparency is handled differently.
+ LLToast::setBackgroundOpaque(TRUE);
+}
+
+// virtual
+void LLNearbyChatToast::setTransparentState(bool transparent)
+{
+ LLToast::setTransparentState(transparent);
+ updateTransparency();
+}
+
+void LLNearbyChatToast::updateTransparency()
+{
+ ETypeTransparency transparency_type;
+
+ if (isHovered())
+ {
+ transparency_type = TT_ACTIVE;
+ }
+ else
+ {
+ transparency_type = getTransparentState() ? TT_FADING : TT_INACTIVE;
+ }
+
+ LLFloater::updateTransparency(transparency_type);
+}
+
// EOF
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 87acd83b23..c57746ec00 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -180,6 +180,9 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type)
populateFoldersList();
+ // Prevent the floater from losing focus (if the sidepanel is undocked).
+ setFocus(TRUE);
+
LLPanelPlaceInfo::setInfoType(type);
}
@@ -330,6 +333,9 @@ void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled)
// when it was enabled/disabled we set the text once again.
mNotesEditor->setText(mNotesEditor->getText());
}
+
+ // Prevent the floater from losing focus (if the sidepanel is undocked).
+ setFocus(TRUE);
}
const std::string& LLPanelLandmarkInfo::getLandmarkTitle() const
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index ccef563544..15e826ac2c 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -212,7 +212,8 @@ void LLPanelPicks::updateData()
mNoPicks = false;
mNoClassifieds = false;
- getChild<LLUICtrl>("picks_panel_text")->setValue(LLTrans::getString("PicksClassifiedsLoadingText"));
+ mNoItemsLabel->setValue(LLTrans::getString("PicksClassifiedsLoadingText"));
+ mNoItemsLabel->setVisible(TRUE);
mPicksList->clear();
LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(getAvatarId());
@@ -314,15 +315,17 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
mNoClassifieds = !mClassifiedsList->size();
}
- if (mNoPicks && mNoClassifieds)
+ bool no_data = mNoPicks && mNoClassifieds;
+ mNoItemsLabel->setVisible(no_data);
+ if (no_data)
{
if(getAvatarId() == gAgentID)
{
- getChild<LLUICtrl>("picks_panel_text")->setValue(LLTrans::getString("NoPicksClassifiedsText"));
+ mNoItemsLabel->setValue(LLTrans::getString("NoPicksClassifiedsText"));
}
else
{
- getChild<LLUICtrl>("picks_panel_text")->setValue(LLTrans::getString("NoAvatarPicksClassifiedsText"));
+ mNoItemsLabel->setValue(LLTrans::getString("NoAvatarPicksClassifiedsText"));
}
}
}
@@ -359,6 +362,8 @@ BOOL LLPanelPicks::postBuild()
mPicksList->setNoItemsCommentText(getString("no_picks"));
mClassifiedsList->setNoItemsCommentText(getString("no_classifieds"));
+ mNoItemsLabel = getChild<LLUICtrl>("picks_panel_text");
+
childSetAction(XML_BTN_NEW, boost::bind(&LLPanelPicks::onClickPlusBtn, this));
childSetAction(XML_BTN_DELETE, boost::bind(&LLPanelPicks::onClickDelete, this));
childSetAction(XML_BTN_TELEPORT, boost::bind(&LLPanelPicks::onClickTeleport, this));
@@ -781,7 +786,7 @@ void LLPanelPicks::showAccordion(const std::string& name, bool show)
void LLPanelPicks::onPanelPickClose(LLPanel* panel)
{
- panel->setVisible(FALSE);
+ getProfilePanel()->closePanel(panel);
}
void LLPanelPicks::onPanelPickSave(LLPanel* panel)
diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h
index 526ba48dcb..a02ed81bb0 100644
--- a/indra/newview/llpanelpicks.h
+++ b/indra/newview/llpanelpicks.h
@@ -149,6 +149,7 @@ private:
LLPanelClassifiedInfo* mPanelClassifiedInfo;
LLPanelPickEdit* mPanelPickEdit;
LLToggleableMenu* mPlusMenu;
+ LLUICtrl* mNoItemsLabel;
// <classified_id, edit_panel>
typedef std::map<LLUUID, LLPanelClassifiedEdit*> panel_classified_edit_map_t;
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 4e63563979..6038ab20d8 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -217,6 +217,10 @@ void LLPanelProfile::setAllChildrenVisible(BOOL visible)
void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
{
+ // Hide currently visible panel (STORM-690).
+ setAllChildrenVisible(FALSE);
+
+ // Add the panel or bring it to front.
if (panel->getParent() != this)
{
addChild(panel);
@@ -243,6 +247,18 @@ void LLPanelProfile::closePanel(LLPanel* panel)
if (panel->getParent() == this)
{
removeChild(panel);
+
+ // Make the underlying panel visible.
+ const child_list_t* child_list = getChildList();
+ if (child_list->size() > 0)
+ {
+ child_list->front()->setVisible(TRUE);
+ child_list->front()->setFocus(TRUE); // prevent losing focus by the floater
+ }
+ else
+ {
+ llwarns << "No underlying panel to make visible." << llendl;
+ }
}
}
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 8176b8c1f9..8916469e67 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -141,10 +141,6 @@ LLToast::LLToast(const LLToast::Params& p)
// init callbacks if present
if(!p.on_delete_toast().empty())
mOnDeleteToastSignal.connect(p.on_delete_toast());
-
- // *TODO: This signal doesn't seem to be used at all.
- if(!p.on_mouse_enter().empty())
- mOnMouseEnterSignal.connect(p.on_mouse_enter());
}
void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent)
@@ -402,7 +398,6 @@ void LLToast::onToastMouseEnter()
{
mHideBtn->setVisible(TRUE);
}
- mOnMouseEnterSignal(this);
mToastMouseEnterSignal(this, getValue());
}
}
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index fb534561c9..d23e858c5c 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -90,8 +90,7 @@ public:
fading_time_secs; // Number of seconds while a toast is transparent
- Optional<toast_callback_t> on_delete_toast,
- on_mouse_enter;
+ Optional<toast_callback_t> on_delete_toast;
Optional<bool> can_fade,
can_be_stored,
enable_hide_btn,
@@ -142,7 +141,7 @@ public:
//
virtual void setVisible(BOOL show);
- /*virtual*/ void setBackgroundOpaque(BOOL b);
+ virtual void setBackgroundOpaque(BOOL b);
//
virtual void hide();
@@ -182,7 +181,6 @@ public:
// Registers signals/callbacks for events
toast_signal_t mOnFadeSignal;
- toast_signal_t mOnMouseEnterSignal;
toast_signal_t mOnDeleteToastSignal;
toast_signal_t mOnToastDestroyedSignal;
boost::signals2::connection setOnFadeCallback(toast_callback_t cb) { return mOnFadeSignal.connect(cb); }
@@ -200,6 +198,10 @@ public:
LLHandle<LLToast> getHandle() { mHandle.bind(this); return mHandle; }
+ bool getTransparentState() const { return mIsTransparent; }
+ virtual void setTransparentState(bool transparent);
+
+
private:
void onToastMouseEnter();
@@ -208,8 +210,6 @@ private:
void expire();
- void setTransparentState(bool transparent);
-
LLUUID mNotificationID;
LLUUID mSessionID;
LLNotificationPtr mNotification;