class: Tools::LintRuleList
fixed the following redraw bug in ModelListView (which is already fixed in SelectionInListView):
if a colored item is shown with selection, the color attribute should be
removed (or relaxed), to avoid drawing the label invisible.
I.e. if the text color is blue or grey, and the selection bg is blue.
we should draw white-on-blue, instead of blue/grey on blue.
For this to work, the info whether drawing a selection must be passed down
through the renderer to the item's draw routine.
--- a/Tools__LintRuleList.st Sun Feb 01 14:17:11 2015 +0100
+++ b/Tools__LintRuleList.st Sun Feb 01 14:17:29 2015 +0100
@@ -814,6 +814,32 @@
"Modified: / 08-10-2014 / 22:56:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+displayLabel:aLabel h:lH on:aGC x:newX y:y h:h isHighlightedAsSelected:isHighlightedAsSelected
+ | cx icon app mode |
+
+ cx := x := newX.
+ app := self application.
+ mode := app mode.
+ mode ~~ #display ifTrue:[
+ mode == #select ifTrue:[
+ icon := self checked
+ ifTrue:[app class checkedIcon]
+ ifFalse:[app class uncheckedIcon].
+ ] ifFalse:[
+ icon := self checked
+ ifTrue:[app class checkedIconDisabled]
+ ifFalse:[app class uncheckedIconDisabled].
+ ].
+ icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2).
+ cx := cx + 22."experimental value - this looks good"
+ ].
+
+ super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h isHighlightedAsSelected:isHighlightedAsSelected
+
+ "Modified (format): / 07-03-2012 / 20:08:02 / cg"
+ "Modified: / 08-10-2014 / 22:56:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
displayOn:aGCOrStream
"/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
@@ -831,14 +857,14 @@
!LintRuleList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleList.st,v 1.27 2014-12-03 18:04:31 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleList.st,v 1.28 2015-02-01 13:17:29 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleList.st,v 1.27 2014-12-03 18:04:31 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleList.st,v 1.28 2015-02-01 13:17:29 cg Exp $'
!
version_SVN
- ^ '$Id: Tools__LintRuleList.st,v 1.27 2014-12-03 18:04:31 cg Exp $'
+ ^ '$Id: Tools__LintRuleList.st,v 1.28 2015-02-01 13:17:29 cg Exp $'
! !