You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2017/12/13 01:47:49 UTC

[GitHub] justinmclean closed pull request #56: Remove hardcoded colours

justinmclean closed pull request #56: Remove hardcoded colours
URL: https://github.com/apache/royale-asjs/pull/56
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/DataItemRenderer.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/DataItemRenderer.as
index 356a3aed2..118efc802 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/DataItemRenderer.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/DataItemRenderer.as
@@ -56,6 +56,8 @@ package org.apache.royale.html.supportClasses
 		}
 
 		private var _columnIndex:int;
+		private var _selectedColor:uint = 0x9C9C9C;
+		private var _hoverColor:uint = 0xECECEC;
 
 		/**
 		 *  The index of the column the itemRenderer represents.
@@ -74,6 +76,40 @@ package org.apache.royale.html.supportClasses
 			_columnIndex = value;
 		}
 
+		/**
+		 *  The selected colour.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9
+		 */
+		public function get selectedColor():uint
+		{
+			return _selectedColor;
+		}
+		public function set selectedColor(value:uint):void
+		{
+			_selectedColor = value;
+		}
+
+		/**
+		 *  The hover colour.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9
+		 */
+		public function get hoverColor():uint
+		{
+			return _hoverColor;
+		}
+		public function set hoverColor(value:uint):void
+		{
+			_hoverColor = value;
+		}
+
 		private var _rowIndex:int;
 
 		/**
@@ -133,9 +169,9 @@ package org.apache.royale.html.supportClasses
 			COMPILE::JS
 			{
 				if (selected)
-					element.style.backgroundColor = '#9C9C9C';
+					element.style.backgroundColor = "#" + selectedColor.toString(16);
 				else if (hovered)
-					element.style.backgroundColor = '#ECECEC';
+					element.style.backgroundColor = "#" + hoverColor.toString(16);
 				else
 					element.style.backgroundColor = null;
 			}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services