From 4d8338ff3eb91b7185b347b4c538ae20ff7940ce Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Fri, 26 Mar 2010 09:47:42 +0200
Subject: [PATCH] Fixen normal EXT-6434 (Mini Map does not go transparent when
 not in focus)

- Set background opaque of the floater depending on focus and made map's background color transparent

Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/99/

--HG--
branch : product-engine
---
 indra/newview/llfloatermap.cpp                     | 14 ++++++++++++++
 indra/newview/llfloatermap.h                       |  2 ++
 indra/newview/skins/default/colors.xml             |  2 +-
 indra/newview/skins/default/xui/en/floater_map.xml |  1 +
 4 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 051ab585e22..ccf286c4cc6 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -215,6 +215,20 @@ void LLFloaterMap::draw()
 	LLFloater::draw();
 }
 
+// virtual
+void LLFloaterMap::onFocusReceived()
+{
+	setBackgroundOpaque(true);
+	LLPanel::onFocusReceived();
+}
+
+// virtual
+void LLFloaterMap::onFocusLost()
+{
+	setBackgroundOpaque(false);
+	LLPanel::onFocusLost();
+}
+
 void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent)
 {
 	LLFloater::reshape(width, height, called_from_parent);
diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h
index 6c9138c6a7e..9ff2f031803 100644
--- a/indra/newview/llfloatermap.h
+++ b/indra/newview/llfloatermap.h
@@ -53,6 +53,8 @@ class LLFloaterMap : public LLFloater
 	/*virtual*/ BOOL	handleRightMouseDown( S32 x, S32 y, MASK mask );
 	/*virtual*/ void	reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 	/*virtual*/ void	draw();
+	/*virtual*/ void	onFocusLost();
+	/*virtual*/ void	onFocusReceived();
 	
 private:
 	void handleZoom(const LLSD& userdata);
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index fcf5cfadb26..777d671e817 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -524,7 +524,7 @@
      reference="Unused?" />
     <color
      name="NetMapBackgroundColor"
-     value="0 0 0 0.3" />
+     value="0 0 0 0" />
     <color
      name="NetMapGroupOwnAboveWater"
      reference="Purple" />
diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml
index 5d35275e171..e21e44204d4 100644
--- a/indra/newview/skins/default/xui/en/floater_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_map.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater
+ bg_alpha_image_overlay="DkGray_66"
  legacy_header_height="18"
  can_minimize="true" 
  can_resize="true"
-- 
GitLab