MacFlatButtonBorder.st
changeset 6976 38ae15a18db3
parent 6973 12bfcaedde29
child 6982 6056c7d05b97
--- a/MacFlatButtonBorder.st	Mon Oct 05 15:15:11 2015 +0200
+++ b/MacFlatButtonBorder.st	Mon Oct 05 15:15:30 2015 +0200
@@ -166,10 +166,13 @@
     ^ backgroundColor1
 !
 
-backgroundColor1:something
+backgroundColor1:newColor
     "the first gradient color"
 
-    backgroundColor1 := something.
+    backgroundColor1 ~= newColor ifTrue:[        
+        backgroundColor1 := newColor.
+        imgTopLeft := imgTopRight := imgBottomLeft := imgBottomRight := nil.
+    ]
 !
 
 backgroundColor2
@@ -178,10 +181,13 @@
     ^ backgroundColor2
 !
 
-backgroundColor2:something
+backgroundColor2:newColor
     "the second gradient color"
 
-    backgroundColor2 := something.
+    backgroundColor2 ~= newColor ifTrue:[        
+        backgroundColor2 := newColor.
+        imgTopLeft := imgTopRight := imgBottomLeft := imgBottomRight := nil.
+    ]
 !
 
 color:newColor
@@ -284,6 +290,10 @@
         imgBottomLeft colorMap at:4 put:backgroundColor2. 
         imgBottomRight colorMap at:4 put:backgroundColor2. 
     ].
+    
+"/    imgBottomRight colorMap at:1 put:color darkened. 
+"/    imgBottomRight colorMap at:2 put:color slightlyDarkened. 
+"/    imgBottomRight colorMap at:3 put:color slightlyDarkened. 
 ! !
 
 !MacFlatButtonBorder class methodsFor:'documentation'!