#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Wed, 29 Aug 2018 13:58:28 +0200
changeset 18365 7feb95497174
parent 18364 02027c0b4be6
child 18366 951955c5f7b9
#UI_ENHANCEMENT by cg class: Tools::NewSystemBrowser class changed: #askForClassToSearch:single:msgTail:resources:filter:forBrowser:thenDo:
Tools__NewSystemBrowser.st
--- a/Tools__NewSystemBrowser.st	Wed Aug 29 09:59:20 2018 +0200
+++ b/Tools__NewSystemBrowser.st	Wed Aug 29 13:58:28 2018 +0200
@@ -18746,8 +18746,11 @@
      colorizedFullNames colorizedShortNames
      resources check showingWhatLabel
      showFullNameHolder onlyShowJavaClassesHolder genShortNameListEntry navigationState
-     doFuzzyMatchHolder|
-
+     doFuzzyMatchHolder matchingCharsColor nonMatchingCharsColor|
+
+    matchingCharsColor := Color gray contrastingColorFor:(View defaultBackgroundColor). "/ slightlyDarkened.
+    nonMatchingCharsColor := Color black contrastingColorFor:(View defaultBackgroundColor).
+    
     resources := resourcesOrNil ? self classResources.
     showFullNameHolder := (LastClassSearchBoxShowedFullName ? false) asValue.
     onlyShowJavaClassesHolder := (LastClassSearchBoxShowedJavaOnly ? false) asValue.
@@ -19020,10 +19023,10 @@
                                                     |name score indexes|
                                                     name := triple first.
                                                     indexes := triple third.
-                                                    name := name asText withColor:Color gray slightlyDarkened.
+                                                    name := name asText withColor:matchingCharsColor.
                                                     indexes do:[:each |
-                                                        "/ name emphasiseFrom:each to:each with:{ #bold . #color->Color black }  
-                                                        name emphasiseFrom:each to:each with:{ #color->Color black }  
+                                                        "/ name emphasiseFrom:each to:each with:{ #bold . #color->nonMatchingCharsColor }  
+                                                        name emphasiseFrom:each to:each with:{ #color->nonMatchingCharsColor }  
                                                     ].
                                                     name
                                                 ].
@@ -19041,8 +19044,8 @@
                                                     nm := nameList at:idx.
                                                     matchIdx := nm asLowercase indexOfString:lcName.
                                                     matchIdx ~~ 0 ifTrue:[
-                                                        nm := nm asText withColor:Color gray slightlyDarkened.
-                                                        nm emphasizeFrom:matchIdx to:matchIdx+lcName size-1 with:{ #color->Color black }
+                                                        nm := nm asText withColor:matchingCharsColor.
+                                                        nm emphasizeFrom:matchIdx to:matchIdx+lcName size-1 with:{ #color->nonMatchingCharsColor }
                                                     ].
                                                     nm
                                                 ].
@@ -19146,6 +19149,7 @@
 
     "Modified: / 04-09-2013 / 17:48:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 05-12-2017 / 13:02:53 / cg"
+    "Modified: / 29-08-2018 / 13:34:51 / Claus Gittinger"
 !
 
 enterBoxTitle:title okText:okText label:label