From adeaf71e3314e44a33864dbe90d93040d4247c67 Mon Sep 17 00:00:00 2001
From: Richard Nelson <richard@lindenlab.com>
Date: Thu, 6 Oct 2011 15:19:15 -0700
Subject: [PATCH] EXP-1300 WIP Visual feedback for Drag and Drop removed hover
 highlighting of buttons when dragging over them also updated toolbar button
 art to match spec

---
 indra/llui/llbutton.cpp                             | 13 ++++---------
 indra/llui/llbutton.h                               |  1 -
 indra/llui/lltoolbar.cpp                            |  2 +-
 .../skins/default/xui/en/widgets/toolbar.xml        |  7 +++++++
 4 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index c9ee62296fe..68cb5164b61 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -515,15 +515,6 @@ BOOL	LLButton::handleRightMouseUp(S32 x, S32 y, MASK mask)
 	return TRUE;
 }
 
-
-void LLButton::onMouseEnter(S32 x, S32 y, MASK mask)
-{
-	LLUICtrl::onMouseEnter(x, y, mask);
-
-	if (isInEnabledChain())
-		mNeedsHighlight = TRUE;
-}
-
 void LLButton::onMouseLeave(S32 x, S32 y, MASK mask)
 {
 	LLUICtrl::onMouseLeave(x, y, mask);
@@ -538,6 +529,10 @@ void LLButton::setHighlight(bool b)
 
 BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
 {
+	if (isInEnabledChain() 
+		&& (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() != this))
+		mNeedsHighlight = TRUE;
+
 	if (!childrenHandleHover(x, y, mask))
 	{
 		if (mMouseDownTimer.getStarted())
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 14c1d01c7ee..a0a7b4e372c 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -160,7 +160,6 @@ class LLButton
 	virtual void	draw();
 	/*virtual*/ BOOL postBuild();
 
-	virtual void	onMouseEnter(S32 x, S32 y, MASK mask);
 	virtual void	onMouseLeave(S32 x, S32 y, MASK mask);
 	virtual void	onMouseCaptureLost();
 
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 7fc6a6de8db..63a1706fe45 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -577,7 +577,7 @@ void LLToolBar::draw()
 			if (command && btn->mIsRunningSignal)
 			{
 				const bool button_command_running = (*btn->mIsRunningSignal)(btn, command->isRunningParameters());
-				btn->setFlashing(button_command_running);
+				btn->setToggleState(button_command_running);
 			}
 		}
 	}
diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
index 15851661146..613dc667622 100644
--- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
@@ -12,6 +12,10 @@
                 bg_opaque_image_overlay="MouseGray"
                 background_opaque="true"/>
   <button_icon_and_text imgoverlay_label_space="7"
+                        label_color_selected="White"
+                        image_pressed="PushButton_Press"
+                        image_pressed_selected="PushButton_Selected_Press"
+                        image_selected="PushButton_Selected_Press"
                         button_width.min="70"
                         button_width.max="140"
                         desired_height="24"
@@ -25,6 +29,9 @@
                         flash_color="EmphasisColor"/>
   <button_icon pad_left="10"
                pad_right="10"
+               image_pressed="PushButton_Press"
+               image_pressed_selected="PushButton_Selected_Press"
+               image_selected="PushButton_Selected_Press"
                desired_height="35"
                button_width.min="35"
                button_width.max="35"               
-- 
GitLab