class: Tools::TestRunnerMini
care for text color when box is yellow
(white on yellow is hard to read)
--- a/Tools__TestRunnerMini.st Fri Jan 30 14:11:56 2015 +0100
+++ b/Tools__TestRunnerMini.st Fri Jan 30 14:54:52 2015 +0100
@@ -208,6 +208,7 @@
name: 'ResultName'
layout: (LayoutFrame 22 0 0 0 0 1 -10 1)
backgroundChannel: resultBackgroundColorAspect
+ foregroundChannel: resultTextForegroundColorAspect
foregroundColor: (Color 100.0 100.0 100.0)
translateLabel: true
labelChannel: resultNameAspect
@@ -220,7 +221,6 @@
level: 0
visibilityChannel: pinButtonVisibleHolder
backgroundChannel: resultBackgroundColorAspect
- foregroundChannel: resultBackgroundColorAspect
hasCharacterOrientedLabel: false
translateLabel: true
labelChannel: pinIcon
@@ -299,7 +299,7 @@
layout: (LayoutFrame 0 0 -20 1 0 0.5 0 1)
style: (FontDescription helvetica medium roman 8 #'iso10646-1')
backgroundChannel: resultBackgroundColorAspect
- foregroundColor: (Color 100.0 100.0 100.0)
+ foregroundChannel: resultTextForegroundColorAspect
translateLabel: true
labelChannel: resultInfoAspect
adjust: left
@@ -331,7 +331,6 @@
)
)
-
! !
!TestRunnerMini class methodsFor:'queries'!
@@ -832,6 +831,20 @@
"Modified: / 02-08-2011 / 18:20:38 / cg"
!
+resultTextForegroundColorAspect
+ <resource: #uiAspect>
+
+ ^ BlockValue
+ with:[:bgColor |
+ bgColor brightness > 0.6 ifTrue:[
+ Color black
+ ] ifFalse:[
+ Color white
+ ].
+ ]
+ argument:self resultBackgroundColorAspect
+!
+
runAllEnabledHolder
^ self notRunningHolder
@@ -1252,14 +1265,14 @@
!TestRunnerMini class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunnerMini.st,v 1.6 2015-01-30 13:11:56 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunnerMini.st,v 1.7 2015-01-30 13:54:52 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunnerMini.st,v 1.6 2015-01-30 13:11:56 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunnerMini.st,v 1.7 2015-01-30 13:54:52 cg Exp $'
!
version_SVN
- ^ '$Id: Tools__TestRunnerMini.st,v 1.6 2015-01-30 13:11:56 cg Exp $'
+ ^ '$Id: Tools__TestRunnerMini.st,v 1.7 2015-01-30 13:54:52 cg Exp $'
! !