From 1e090dafa6271ec2acb92441bcbbbbe058124be0 Mon Sep 17 00:00:00 2001
From: Andrew Dyukov <adyukov@productengine.com>
Date: Tue, 1 Jun 2010 16:42:31 +0300
Subject: [PATCH] EXT-7087 ADDITIONAL FIX Style changes regarding image_flash
 attribute

Removed default "FlashIconAbsent" value of image_flash button attribute. Changed check for presence of thic icon in code accordingly.

--HG--
branch : product-engine
---
 indra/llui/llbutton.cpp                       |  4 ++--
 indra/llui/llbutton.h                         |  3 +--
 .../skins/default/xui/en/widgets/button.xml   |  2 +-
 .../default/xui/en/widgets/tab_container.xml  | 21 ++++++++-----------
 4 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index a8f72183fd7..34f3049f2e2 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -636,8 +636,8 @@ void LLButton::draw()
 
 	if (mFlashing)
 	{
-		// if we have icon for flashing, use it as image for button
-		if(flash && mImageFlash->getName() != "FlashIconAbsent")
+		// if button should flash and we have icon for flashing, use it as image for button
+		if(flash && mImageFlash)
 		{
 			// setting flash to false to avoid its further influence on glow
 			flash = false;
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index b251c3d65d9..9bd566d3c96 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -314,8 +314,7 @@ class LLButton
 
 	/* There are two ways an image can flash- by making changes in color according to flash_color attribute
 	   or by changing icon from current to the one specified in image_flash. Second way is used only if
-	   the name of flash icon is different from "FlashIconAbsent" which is there by default. First way is used 
-	   otherwise. */
+	   flash icon name is set in attributes(by default it isn't). First way is used otherwise. */
 	LLPointer<LLUIImage>		mImageFlash;
 
 	LLUIColor					mHighlightColor;
diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml
index 6dcc27b469d..2d0a1728d58 100644
--- a/indra/newview/skins/default/xui/en/widgets/button.xml
+++ b/indra/newview/skins/default/xui/en/widgets/button.xml
@@ -2,12 +2,12 @@
 <!-- Additional attributes:
   image_pressed
 	image_pressed_selected
+  image_flash
    -->
 <button image_unselected="PushButton_Off"
         image_selected="PushButton_Selected"
         image_disabled_selected="PushButton_Selected_Disabled"
         image_disabled="PushButton_Disabled"
-        image_flash="FlashIconAbsent"
         image_top_pad="0"
         image_bottom_pad="0"
         imgoverlay_label_space="1"
diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
index 30b0a8462a7..c37ead0be20 100644
--- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml
+++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
@@ -11,31 +11,28 @@ label_pad_left - padding to the left of tab button labels
                tab_height="21"
                label_pad_bottom="2"
                label_pad_left="4">
+  <!--
+  Possible additional attributes for tabs:
+  tab_bottom_image_flash
+  tab_left_image_flash
+  tab_top_image_flash
+  -->
   <first_tab tab_top_image_unselected="TabTop_Left_Off"
                tab_top_image_selected="TabTop_Left_Selected"
-               tab_top_image_flash="FlashIconAbsent"
                tab_bottom_image_unselected="Toolbar_Left_Off"
                tab_bottom_image_selected="Toolbar_Left_Selected"
-               tab_bottom_image_flash="FlashIconAbsent"
                tab_left_image_unselected="SegmentedBtn_Left_Disabled"
-               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"
-               tab_left_image_flash="FlashIconAbsent"/>
+               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/>
   <middle_tab tab_top_image_unselected="TabTop_Middle_Off"
                tab_top_image_selected="TabTop_Middle_Selected"
-               tab_top_image_flash="FlashIconAbsent"
                tab_bottom_image_unselected="Toolbar_Middle_Off"
                tab_bottom_image_selected="Toolbar_Middle_Selected"
-               tab_bottom_image_flash="FlashIconAbsent"
                tab_left_image_unselected="SegmentedBtn_Left_Disabled"
-               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"
-               tab_left_image_flash="FlashIconAbsent"/>
+               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/>
   <last_tab tab_top_image_unselected="TabTop_Right_Off"
                tab_top_image_selected="TabTop_Right_Selected"
-               tab_top_image_flash="FlashIconAbsent"
                tab_bottom_image_unselected="Toolbar_Right_Off"
                tab_bottom_image_selected="Toolbar_Right_Selected"
-               tab_bottom_image_flash="FlashIconAbsent"
                tab_left_image_unselected="SegmentedBtn_Left_Disabled"
-               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"
-               tab_left_image_flash="FlashIconAbsent"/>
+               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/>
 </tab_container>
-- 
GitLab