From 8ca06e7bf37f7e5391e14f74d8404bdc05d683d4 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 8 Feb 2010 08:19:32 -0800 Subject: nearby media pops up on hover --- indra/llui/lldockcontrol.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ indra/llui/lldockcontrol.h | 5 +++-- 2 files changed, 44 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp index d836a5f4cd..f91c07184d 100644 --- a/indra/llui/lldockcontrol.cpp +++ b/indra/llui/lldockcontrol.cpp @@ -162,7 +162,9 @@ bool LLDockControl::isDockVisible() { case LEFT: // to keep compiler happy break; + case BOTTOM: case TOP: + { // check is dock inside parent rect LLRect dockParentRect = mDockWidget->getParent()->calcScreenRect(); @@ -173,6 +175,9 @@ bool LLDockControl::isDockVisible() } break; } + default: + break; + } } } @@ -254,6 +259,42 @@ void LLDockControl::moveDockable() } mDockTongueY = dockRect.mTop; + break; + case BOTTOM: + x = dockRect.getCenterX() - dockableRect.getWidth() / 2; + y = dockRect.mBottom; + // unique docking used with dock tongue, so add tongue height o the Y coordinate + if (use_tongue) + { + y -= mDockTongue->getHeight(); + } + + // check is dockable inside root view rect + if (x < rootRect.mLeft) + { + x = rootRect.mLeft; + } + if (x + dockableRect.getWidth() > rootRect.mRight) + { + x = rootRect.mRight - dockableRect.getWidth(); + } + + // calculate dock tongue position + dockParentRect = mDockWidget->getParent()->calcScreenRect(); + if (dockRect.getCenterX() < dockParentRect.mLeft) + { + mDockTongueX = dockParentRect.mLeft - mDockTongue->getWidth() / 2; + } + else if (dockRect.getCenterX() > dockParentRect.mRight) + { + mDockTongueX = dockParentRect.mRight - mDockTongue->getWidth() / 2;; + } + else + { + mDockTongueX = dockRect.getCenterX() - mDockTongue->getWidth() / 2; + } + mDockTongueY = dockRect.mTop + mDockTongue->getHeight(); + break; } diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h index 550955c4c5..a5caf68001 100644 --- a/indra/llui/lldockcontrol.h +++ b/indra/llui/lldockcontrol.h @@ -47,8 +47,9 @@ class LLDockControl public: enum DocAt { - TOP - ,LEFT + TOP, + LEFT, + BOTTOM }; public: -- cgit v1.2.3 From 75916b486cca96e36cd11d92c0b3c21cb7e72d05 Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 10 Feb 2010 10:46:37 -0800 Subject: fixed tongue positioning --- indra/llui/lldockcontrol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp index f91c07184d..d738b10130 100644 --- a/indra/llui/lldockcontrol.cpp +++ b/indra/llui/lldockcontrol.cpp @@ -293,7 +293,7 @@ void LLDockControl::moveDockable() { mDockTongueX = dockRect.getCenterX() - mDockTongue->getWidth() / 2; } - mDockTongueY = dockRect.mTop + mDockTongue->getHeight(); + mDockTongueY = dockRect.mBottom - mDockTongue->getHeight(); break; } -- cgit v1.2.3 From 6c5b984bf670e34fd88a8f1a0bdeb1042fa531b2 Mon Sep 17 00:00:00 2001 From: richard Date: Thu, 11 Feb 2010 18:06:25 -0800 Subject: converted llfloaternearbymedia to llpanelnearbymedia moved from LLTransientDockableFloater model to popup panel model like volume popup --- indra/llui/llscrolllistctrl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 478e270c98..ac4811210b 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1388,6 +1388,8 @@ void LLScrollListCtrl::drawItems() LLGLSUIDefault gls_ui; + F32 alpha = getDrawContext().mAlpha; + { LLLocalClipRect clip(mItemListRect); @@ -1463,7 +1465,7 @@ void LLScrollListCtrl::drawItems() bg_color = mBgReadOnlyColor.get(); } - item->draw(item_rect, fg_color, bg_color, highlight_color, mColumnPadding); + item->draw(item_rect, fg_color % alpha, bg_color% alpha, highlight_color % alpha, mColumnPadding); cur_y -= mLineHeight; } -- cgit v1.2.3 From e159873eec4137b041fc8045f6d79ac6c21d2101 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 12 Feb 2010 16:54:47 -0800 Subject: added popup panel to hold nearby media popup and stopped using top view --- indra/llui/lltooltip.cpp | 6 ------ indra/llui/lltooltip.h | 2 -- 2 files changed, 8 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 173fde8e76..ed7fd02e14 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -129,12 +129,6 @@ BOOL LLToolTipView::handleScrollWheel( S32 x, S32 y, S32 clicks ) return FALSE; } -void LLToolTipView::onMouseLeave(S32 x, S32 y, MASK mask) -{ - LLToolTipMgr::instance().blockToolTips(); -} - - void LLToolTipView::drawStickyRect() { gl_rect_2d(LLToolTipMgr::instance().getMouseNearRect(), LLColor4::white, false); diff --git a/indra/llui/lltooltip.h b/indra/llui/lltooltip.h index c0811c56c3..24e32b9b24 100644 --- a/indra/llui/lltooltip.h +++ b/indra/llui/lltooltip.h @@ -56,8 +56,6 @@ public: /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleScrollWheel( S32 x, S32 y, S32 clicks ); - /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); - void drawStickyRect(); /*virtual*/ void draw(); -- cgit v1.2.3