[Cuis-dev] [IMPROV] AutoCompleter Theme Support

Gerald Klix cuis.01 at klix.ch
Sat May 8 06:44:49 PDT 2021


Hi all, Hi Juan,

if found the blue color the auto-completer uses
for possibly invalid suggestions rather hard to
read.

Finally -- after 5 month -- I added theme support for the auto-completer.
I only moved the colors to the Theme class.
I did not try to find suitable colors
for the additional themes; I presume
the outcome would have been rather unpleasant :)


HTH and Best Regards,

Gerald
-------------- next part --------------
'From Haver 5.0 [latest update: #4589] on 8 May 2021 at 3:33:56 pm'!

!Theme methodsFor: 'tool colors' stamp: 'KLG 5/8/2021 15:12:47'!
autoCompleter
	"Answer the autocompleter's color for  entries."

	^ self text! !

!Theme methodsFor: 'tool colors' stamp: 'KLG 5/8/2021 15:26:51'!
autoCompleterDefaultBorderColor
	"Answer the auto comleters default border color."

	^ `Color gray`! !

!Theme methodsFor: 'tool colors' stamp: 'KLG 5/8/2021 15:09:00'!
autoCompleterMaybeInvalid
	"Answer the autocompleter's color for possible invalid entries."

	^ `Color blue`! !


!AutoCompleterMorph methodsFor: 'drawing' stamp: 'KLG 5/8/2021 15:10:07'!
colorOf: entry

	^(completer isPossibleInvalidEntry: entry) 
		ifTrue: [ Theme current autoCompleterMaybeInvalid ] 
		ifFalse: [ Theme current autoCompleter ]
	! !

!AutoCompleterMorph methodsFor: 'initialization' stamp: 'KLG 5/8/2021 15:27:47'!
defaultBorderColor
	"My default border color.
	
	Note: My background color is derived from this color."
	^ Theme current autoCompleterDefaultBorderColor ! !



More information about the Cuis-dev mailing list