-
Notifications
You must be signed in to change notification settings - Fork 0
Uncategorized Notes
Corvin Koegler edited this page May 28, 2024
·
4 revisions
Color can be set using rgb with an alpha channel
[Color r: 0.9 g: 0.75 b: 0.45 alpha: 0.5]
You can select the color of the system window (for colorful windows setting) like this:
windowColorToUse
^ Color
colorFrom: (Model useColorfulWindows
ifTrue: [self userInterfaceTheme customWindowColor
ifNil: [Color
r: 0.9
g: 0.75
b: 0.45
alpha: 0.5]]
ifFalse: [self userInterfaceTheme uniformWindowColor
ifNil: [Color veryVeryLightGray]])
There are multiple color pickers in the morphic framework.
NewColorPickerMorph new openInWorld
Some filout code from the workspace:
fileOutOnAccept
<preference: 'File-out workspace contents on accept'
categoryList: #('browsing' 'tools')
description: 'If true, accepting contents in a workspace will append them to a file on disk. The file name is derived from the workspace''s current window title and can thus be changed. The default name is thus ''Workspace.text''.'
type: #Boolean>
^ FileOutOnAccept ifNil: [ true ]
addModelItemsToWindowMenu: aMenu
aMenu addLine.
aMenu
add: 'change file name...'
target: self
action: #changeFileName.
aMenu
add: 'save contents to file...'
target: self
action: #saveContentsInFile.
aMenu
addUpdating: #saveContentsInFileOnAcceptWording
target: self
action: #saveContentsInFileOnAccept.
aMenu
addUpdating: #appendContentsToFileOnAcceptWording
target: self
action: #appendContentsToFileOnAccept.
aMenu addLine.
aMenu
add: 'inspect variables'
target: self
action: #inspectBindings.
aMenu
add: 'reset variables'
target: self
action: #resetBindings.
aMenu addLine.
aMenu
addUpdating: #mustDeclareVariableWording
target: self
action: #toggleVariableDeclarationMode.
aMenu
addUpdating: #acceptDroppedMorphsWording
target: self
action: #toggleDroppingMorphForReference.
self addToggleStylingMenuItemTo: aMenu.