summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2010-02-23 18:13:50 -0800
committerRick Pasetto <rick@lindenlab.com>2010-02-23 18:13:50 -0800
commit262f34b25dbdde7940ef28ff02058f4ef12d92f1 (patch)
tree94cc86c4cded4e4839d871d41a073ccf6e4969ab
parent8cf7dad209fd97c1ab822ef183e8a74faceeb3d8 (diff)
FIX EXT-5517: clear hover face when cursor hovers over Nearby Media panel
Review #140 This isn't the most generalized solution, but it fixes the proximal problem of selecting items in the Nearby Media panel, and is low risk because the code change is isolated to that panel.
-rw-r--r--indra/newview/llpanelnearbymedia.cpp16
-rw-r--r--indra/newview/llpanelnearbymedia.h1
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_media.xml14
3 files changed, 20 insertions, 11 deletions
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index 3b5192b07f..1d720ceb25 100644
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -231,6 +231,7 @@ void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent)
const F32 AUTO_CLOSE_FADE_TIME_START= 4.0f;
const F32 AUTO_CLOSE_FADE_TIME_END = 5.0f;
+/*virtual*/
void LLPanelNearByMedia::draw()
{
//LLUICtrl* new_top = gFocusMgr.getTopCtrl();
@@ -265,6 +266,21 @@ void LLPanelNearByMedia::draw()
}
}
+/*virtual*/
+BOOL LLPanelNearByMedia::handleHover(S32 x, S32 y, MASK mask)
+{
+ LLPanel::handleHover(x, y, mask);
+
+ // If we are hovering over this panel, make sure to clear any hovered media
+ // ID. Note that the more general solution would be to clear this ID when
+ // the mouse leaves the in-scene view, but that proved to be problematic.
+ // See EXT-5517
+ LLViewerMediaFocus::getInstance()->clearHover();
+
+ // Always handle
+ return true;
+}
+
bool LLPanelNearByMedia::getParcelAudioAutoStart()
{
return mParcelAudioAutoStart;
diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h
index 551e2419c4..4f864519f5 100644
--- a/indra/newview/llpanelnearbymedia.h
+++ b/indra/newview/llpanelnearbymedia.h
@@ -56,6 +56,7 @@ public:
/*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
/*virtual*/ void onTopLost ();
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
+ /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
// this is part of the nearby media *dialog* so we can track whether
// the user *implicitly* wants audio on or off via their *explicit*
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml
index aba1589eae..7c0ce9e62e 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml
@@ -2,6 +2,7 @@
<panel
can_resize="true"
can_close="false"
+ mouse_opaque="true"
bg_opaque_image="Volume_Background"
bg_alpha_image="Volume_Background"
background_opaque="true"
@@ -132,6 +133,7 @@
ame="OnOthers" />
</combo_box>
<scroll_list
+ name="media_list"
follows="left|top|bottom|right"
column_padding="0"
height="105"
@@ -140,8 +142,7 @@
bg_stripe_color="0.25 0.25 0.25 0.25"
top_pad="8"
left="10"
- right="-10"
- name="media_list">
+ right="-10">
<scroll_list.columns
type="checkbox"
width="-1"
@@ -189,11 +190,9 @@
left="10"
right="-10"
border_size="0"
- mouse_opaque="false"
orientation="horizontal">
<layout_panel
name="stop"
- mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@@ -221,7 +220,6 @@
</layout_panel>
<layout_panel
name="play"
- mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@@ -249,7 +247,6 @@
</layout_panel>
<layout_panel
name="pause"
- mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@@ -276,7 +273,6 @@
</layout_panel>
<layout_panel
name="volume_slider_ctrl"
- mouse_opaque="false"
auto_resize="true"
user_resize="false"
follows="left|right"
@@ -301,7 +297,6 @@
</layout_panel>
<layout_panel
name="mute"
- mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@@ -330,7 +325,6 @@
</layout_panel>
<layout_panel
name="zoom"
- mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@@ -358,7 +352,6 @@
</layout_panel>
<layout_panel
name="unzoom"
- mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@@ -387,7 +380,6 @@
<layout_panel
name="right_bookend"
width="0"
- mouse_opaque="false"
user_resize="false" />
</layout_stack>
</panel>