summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llbutton.cpp2
-rw-r--r--indra/llui/llfloater.cpp23
-rw-r--r--indra/llui/llfloater.h7
-rw-r--r--indra/llui/lltoolbar.cpp5
4 files changed, 29 insertions, 8 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 0a7584a576..4f0c0d31bd 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -548,7 +548,7 @@ void LLButton::setHighlight(bool b)
BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
{
if (isInEnabledChain()
- && (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() != this))
+ && (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() == this))
mNeedsHighlight = TRUE;
if (!childrenHandleHover(x, y, mask))
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 4bcc7c6fe0..1e6c8b4a71 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -247,6 +247,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mHeaderHeight(p.header_height),
mLegacyHeaderHeight(p.legacy_header_height),
mMinimized(FALSE),
+ mVisibleWhenMinimized(TRUE),
mForeground(FALSE),
mFirstLook(TRUE),
mButtonScale(1.0f),
@@ -1406,6 +1407,17 @@ void LLFloater::removeDependentFloater(LLFloater* floaterp)
floaterp->mDependeeHandle = LLHandle<LLFloater>();
}
+void LLFloater::setVisibleWhenMinimized(bool visible)
+{
+ mVisibleWhenMinimized = visible;
+ if (visible && isMinimized())
+ {
+ // restack in minimized stack
+ setMinimized(FALSE);
+ setMinimized(TRUE);
+ }
+}
+
BOOL LLFloater::offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index)
{
if( mButtonsEnabled[index] )
@@ -1782,11 +1794,14 @@ void LLFloater::draw()
}
if (isMinimized())
{
- for (S32 i = 0; i < BUTTON_COUNT; i++)
+ if (mVisibleWhenMinimized)
{
- drawChild(mButtons[i]);
+ for (S32 i = 0; i < BUTTON_COUNT; i++)
+ {
+ drawChild(mButtons[i]);
+ }
+ drawChild(mDragHandle);
}
- drawChild(mDragHandle);
}
else
{
@@ -2441,7 +2456,7 @@ void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom)
{
// Examine minimized children.
LLFloater* floater = (LLFloater*)((LLView*)*child_it);
- if(floater->isMinimized())
+ if(floater->isMinimized() && floater->getVisibleWhenMinimized())
{
LLRect r = floater->getRect();
if((r.mBottom < (row + floater_header_size))
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 275b508f79..5e3d3aefc9 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -212,8 +212,10 @@ public:
void addDependentFloater(LLFloater* dependent, BOOL reposition = TRUE);
void addDependentFloater(LLHandle<LLFloater> dependent_handle, BOOL reposition = TRUE);
LLFloater* getDependee() { return (LLFloater*)mDependeeHandle.get(); }
- void removeDependentFloater(LLFloater* dependent);
- BOOL isMinimized() const { return mMinimized; }
+ void removeDependentFloater(LLFloater* dependent);
+ BOOL isMinimized() const { return mMinimized; }
+ void setVisibleWhenMinimized(bool visible);
+ bool getVisibleWhenMinimized() const { return mVisibleWhenMinimized;}
/// isShown() differs from getVisible() in that isShown() also considers
/// isMinimized(). isShown() is true only if visible and not minimized.
bool isShown() const;
@@ -420,6 +422,7 @@ private:
S32 mLegacyHeaderHeight;// HACK see initFloaterXML()
BOOL mMinimized;
+ bool mVisibleWhenMinimized;
BOOL mForeground;
LLHandle<LLFloater> mDependeeHandle;
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index a1ea4ba18b..a75a1552fc 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -871,7 +871,10 @@ void LLToolBarButton::onMouseEnter(S32 x, S32 y, MASK mask)
LLUICtrl::onMouseEnter(x, y, mask);
// Always highlight toolbar buttons, even if they are disabled
- mNeedsHighlight = TRUE;
+ if (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() == this)
+ {
+ mNeedsHighlight = TRUE;
+ }
}
void LLToolBarButton::onMouseCaptureLost()