[Cuis-dev] [IMPROV] Re: Tool tips appearance

Gerald Klix cuis.01 at klix.ch
Fri Aug 6 13:22:03 PDT 2021


Please find attached my version of a configurable an themeable
hover help border.

I hope you like it.


Best Regards,

Gerald


On 8/6/21 9:09 PM, Gerald Klix via Cuis-dev wrote:
> The screenshot looks nice, but with
> 
> Display extent ~~> 4304 at 3851
> 
> I can see hardly a difference,
> however I love the idea.
> 
> Stay tuned for my version ...
> 
> 
> Best Regards,
> 
> Gerald
> 
> 
> 
> On 8/6/21 8:42 PM, ken.dickey--- via Cuis-dev wrote:
>> On 2021-08-06 11:17, Hilaire Fernandes via Cuis-dev wrote:
>>
>>> I added a thin black line around the tips, do you like it ?
>>
>> I like it!  Very nice!
>>
>> -KenD
>>
-------------- next part --------------
'From Haver 5.0 [latest update: #4738] on 6 August 2021 at 10:21:33 pm'!

Modules newEnvironment: #Klotzli!
Modules newEnvironment: #KlotzliTest!
!Preferences class methodsFor: 'get/set' stamp: 'KLG 8/6/2021 21:48:02'!
bigHoverHelpBorder
	"Hover help a big border."

	self hoverHelpBorderWidth: 4
! !

!Preferences class methodsFor: 'get/set' stamp: 'KLG 8/6/2021 22:15:14'!
defaultHoverHelpBorder
	"Reset the hover help border to the default value."

	self preferencesDictionary 
		removeKey: #hoverHelpBorderWidth
		ifAbsent: []
! !

!Preferences class methodsFor: 'get/set' stamp: 'KLG 8/6/2021 21:46:11'!
hoverHelpBorderWidth: aWidth
	"Set the hover help border width."

	self setPreference: #hoverHelpBorderWidth toValue: (aWidth min: 5 max: 0)
! !

!Preferences class methodsFor: 'get/set' stamp: 'KLG 8/6/2021 21:42:59'!
noHoverHelpBorder
	"Hover help should have no border."

	self hoverHelpBorderWidth: 0
! !

!Preferences class methodsFor: 'standard queries'!
hoverHelpBorderWidth
	^ self
		valueOfFlag: #hoverHelpBorderWidth
		ifAbsent: [ 4 ].! !


!Theme methodsFor: 'widget colors' stamp: 'KLG 8/6/2021 21:20:35'!
hoverHelpBorderColor
	"Answer the color for Hover help widgets."

	^ `Color black`! !

!Theme methodsFor: 'other options' stamp: 'KLG 8/6/2021 21:57:05'!
hoverHelpBorderWidth
	"Answer the hover help morph's border width."
	
	^ 2! !


!HoverHelpMorph methodsFor: 'initialization' stamp: 'KLG 8/6/2021 21:29:12'!
defaultBorderWidth
	"answer the default border width for the receiver"
	
	^ Preferences hoverHelpBorderWidth! !

!HoverHelpMorph methodsFor: 'drawing' stamp: 'KLG 8/6/2021 21:39:41'!
drawOn: aCanvas
	"Dram the hover help"

	| bounds |
	bounds _ self morphLocalBounds.
	aCanvas
		roundRect: bounds
		color: (borderWidth = 0
			ifTrue: [ self color ]
			ifFalse: [ Theme current hoverHelpBorderColor ])
		radius: 6.
	borderWidth = 0 ifFalse: [
		aCanvas
			roundRect: (bounds insetBy: borderWidth)
			color: self color
			radius: 4 ].
	aCanvas
		textComposition: textComposition
		bounds: (bounds insetBy: 4)
		color: `Color black`
		selectionColor: (Theme current textHighlightFocused: false).! !


!Preferences class reorganize!
('add preferences' addPreference:categories:default:balloonHelp: addPreference:categories:default:balloonHelp:changeInformee:changeSelector: addPreference:category:default:balloonHelp:)
('bigger and smaller GUI' bigFonts defaultFont05 defaultFont06 defaultFont07 defaultFont08 defaultFont09 defaultFont10 defaultFont11 defaultFont12 defaultFont14 defaultFont17 defaultFont22 defaultFont28 defaultFont36 defaultFont46 defaultFont60 defaultFont80 haloHandleSize hugeFonts smallFonts standardFonts tinyFonts veryBigFonts verySmallFonts)
('class finder' classFinder: restoreDefaultClassFinder)
('class state access' parameters preferencesDictionary releaseClassState)
('code generation' leftArrowAssignmentsInGeneratedCodeWithComputedDefault)
('exception handling' allowNonLocalReturnsInExceptionHandlers warnAboutNonLocalReturnsInExceptionHandlers)
('fonts' loadOnlyLatinGlyphData properDisplayAlphaForFonts restoreDefaultFonts setButtonFontTo: setCodeFontTo: setDefaultFont: setDefaultFont:spec: setListFontTo: setMenuFontTo: setSystemFontTo: setWindowTitleFontTo: standardButtonFont standardCodeFont standardListFont standardMenuFont subPixelRenderColorFonts windowTitleFont)
('get/set' bigHoverHelpBorder defaultHoverHelpBorder disable: disableFocusFollowsMouse disableTileResizerInWindowMenu doesNotUnderstand: enable: enableFocusFollowsMouse enableTileResizerInWindowMenu hoverHelpBorderWidth: noHoverHelpBorder setPreference:toValue: togglePreference: valueOfFlag: valueOfFlag:ifAbsent:)
('halos' haloSpecifications iconicHaloSpecifications installHaloSpecsFromArray: installHaloTheme: resetHaloSpecifications)
('hard-coded prefs' desktopMenuTitle)
('initialization' compileAccessMethodForPreference: setPreferencesFrom:)
('menu icons' useMenuIcons useNoMenuIcons)
('misc' wantsChangeSetLogging)
('parameters' annotationInfo defaultAnnotationRequests defaultAuthorName setDefaultAnnotationInfo)
('personalization' askToInstallComplexPackage compileHardCodedPref:enable: disableProgrammerFacilities enableProgrammerFacilities fullPrintItInWorkspaces stylingWithEmphasisInWorkspaces usePreDebugWindow)
('preference-object access' preferenceAt: preferenceAt:ifAbsent:)
('preferences panel' openPreferencesInspector)
('scrollbar parameters' scrollbarThickness)
('shout' backgroundColorFillsAllBackground highlightBlockNesting italicsInShout shoutInWorkspaces useAlwaysLeftArrow useAssignmentGlyphLeftArrow)
('standard queries' aaFontsColormapDepth allowBlockArgumentAssignment alternativeBrowseIt assignmentGlyphSelector autoNumberUserChanges automaticPlatformSettings balloonHelpEnabled biggerCursors browseWithPrettyPrint canRecordWhilePlaying caseSensitiveFinds changeSetVersionNumbers cheapWindowReframe checkForSlips classFinder clickGrabsMorphs cmdDotEnabled ctrlArrowsScrollHorizontally debugHaloHandle debugLogTimestamp debugShowDamage debugShowDamage2 decorateBrowserButtons diffsInChangeList diffsWithPrettyPrint dismissAllOnOptionClose extraDebuggerButtons focusFollowsMouse focusIndicatorWidth fullScreenLeavesDeskMargins haloEnclosesFullBounds halosShowCoordinateSystem hoverHelpBorderWidth inspectStringsLiteraly leftArrowAssignmentsInGeneratedCode listClassesHierarchically logDebuggerStackToFile menuKeyboardControl optionalButtons prettyPrintRectangularBlocks selectionsMayShrink selectiveHalos serverMode showAnnotations showLinesInHierarchyViews soundQuickStart soundStopWhenDone soundsEnabled subPixelRenderFonts syntaxHighlightingAsYouType syntaxHighlightingAsYouTypeAnsiAssignment syntaxHighlightingAsYouTypeLeftArrowAssignment systemWindowEmbedOK tapAndHoldEmulatesButton2 thoroughSenders tileResizerInWindowMenu transcriptLogVerbose wantsMenuIcons warnIfNoChangesFile warnIfNoSourcesFile)
('start up' checkLostChangesOnStartUp)
('themes' cuisDefaults forMouse forTouch slowMachine smalltalk80)
('user changes' use:asUserChangesFileNameExtensionWhile: userChangesFileNameExtension)
!



More information about the Cuis-dev mailing list