Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-mt.65.mcz ==================== Summary ==================== Name: PreferenceBrowser-mt.65 Author: mt Time: 10 August 2016, 3:59:55.891966 pm UUID: 9d1c8adb-2760-6049-acc1-0e26114829b5 Ancestors: PreferenceBrowser-mt.64 A *very* simple welcome wizard, meant to be used exactly once when starting an image freshly for the very first time. Try to mitigate the old issue of "What should the the default preferences in the next release?" If not working as expected, can be nuked from the release image easily. :-) =============== Diff against PreferenceBrowser-mt.64 =============== Item was added: + Morph subclass: #PreferenceWizardMorph + instanceVariableNames: 'previewWorld titleMorph buttonRowMorph controlMorph startButton previousButton nextButton pages currentPageIndex pagesLabel skipButton' + classVariableNames: '' + poolDictionaries: '' + category: 'PreferenceBrowser'! Item was added: + ----- Method: PreferenceWizardMorph class>>generateLabelCallbacks (in category 'as yet unclassified') ----- + generateLabelCallbacks + "self generateLabelCallbacks" + + self selectors + select: [:ea | ea beginsWith: 'state'] + thenDo: [:ea | + | suffix | + suffix := ea allButFirst: 'state' size. + self + compile: ('label{1}\ "Auto-generated."\\ ^ self state{1} ifTrue: [''x''] ifFalse: ['' '']' withCRs format: {suffix}) + classified: 'buttons']. + ! Item was added: + ----- Method: PreferenceWizardMorph>>accept (in category 'actions') ----- + accept + + self showSqueak.! Item was added: + ----- Method: PreferenceWizardMorph>>chooseTheme: (in category 'actions') ----- + chooseTheme: aTheme + + aTheme apply. + + "The theme does not theme this fake world." + previewWorld fillStyle: ActiveWorld fillStyle.! Item was added: + ----- Method: PreferenceWizardMorph>>createButton (in category 'initialization') ----- + createButton + + ^ PluggableButtonMorphPlus new + setProperty: #noUserInterfaceTheme toValue: true; + offColor: (Color gray: 0.2); + feedbackColor: (Color gray: 0.5); + model: self; + font: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 12); + textColor: Color white; + borderColor: Color white; + instVarNamed: #borderColor put: Color white; "HACK!!" + borderWidth: 2; + cornerStyle: #rounded; + vResizing: #shrinkWrap; + hResizing: #shrinkWrap; + layoutInset: (20@10 corner: 20@10); + yourself! Item was added: + ----- Method: PreferenceWizardMorph>>createCheckbox:for: (in category 'initialization') ----- + createCheckbox: label for: selector + + | box lbl btn | + + btn := self createButton + label: ' '; + onColor: Color white offColor: (Color gray: 0.2); + vResizing: #rigid; + hResizing: #rigid; + action: ('toggle', selector) asSymbol; + getStateSelector: ('state', selector) asSymbol; + extent: 25@25. + + lbl := self createLabel: label color: Color white. + + box := Morph new + color: Color transparent; + changeTableLayout; + listDirection: #leftToRight; + cellPositioning: #topLeft; + hResizing: #spaceFill; + vResizing: #shrinkWrap; + cellInset: 10; + yourself. + + box addAllMorphs: {btn. lbl}. + ^ box! Item was added: + ----- Method: PreferenceWizardMorph>>createHorizontalSpacer (in category 'initialization') ----- + createHorizontalSpacer + + ^ Morph new + color: Color transparent; + hResizing: #spaceFill; + extent: 5@5; + yourself! Item was added: + ----- Method: PreferenceWizardMorph>>createLabel: (in category 'initialization') ----- + createLabel: aString + + ^ self createLabel: aString color: (Color gray: 0.8)! Item was added: + ----- Method: PreferenceWizardMorph>>createLabel:color: (in category 'initialization') ----- + createLabel: aString color: aColor + + | lbl | + lbl := TextMorph new hResizing: #spaceFill; vResizing: #shrinkWrap. + lbl newContents:aString. + lbl text + addAttribute: (TextColor color: aColor); + addAttribute: (TextFontReference toFont: ((StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 12))). + ^ lbl! Item was added: + ----- Method: PreferenceWizardMorph>>createPage (in category 'initialization') ----- + createPage + + ^ Morph new + color: Color transparent; + hResizing: #spaceFill; + vResizing: #spaceFill; + changeTableLayout; + listDirection: #topToBottom; + cellPositioning: #topLeft; + layoutInset: 20; + cellInset: 10; + yourself! Item was added: + ----- Method: PreferenceWizardMorph>>createVerticalSpace (in category 'initialization') ----- + createVerticalSpace + + ^ Morph new + color: Color transparent; + vResizing: #rigid; + extent: 5@5; + yourself! Item was added: + ----- Method: PreferenceWizardMorph>>createVerticalSpacer (in category 'initialization') ----- + createVerticalSpacer + + ^ Morph new + color: Color transparent; + vResizing: #spaceFill; + extent: 5@5; + yourself! Item was added: + ----- Method: PreferenceWizardMorph>>filterEvent:for: (in category 'event handling') ----- + filterEvent: aKeyboardEvent for: aMorph + + aKeyboardEvent isKeystroke ifTrue: [ + aKeyboardEvent keyCharacter = Character escape + ifTrue: [self showSqueak. ^ aKeyboardEvent ignore]. + (aKeyboardEvent keyCharacter = Character cr and: [self isInWelcome]) + ifTrue: [self showPlayfield. ^ aKeyboardEvent ignore]. + ]. + + ^ aKeyboardEvent! Item was added: + ----- Method: PreferenceWizardMorph>>handlesMouseDown: (in category 'event handling') ----- + handlesMouseDown: evt + ^ true! Item was added: + ----- Method: PreferenceWizardMorph>>initialize (in category 'initialization') ----- + initialize + + super initialize. + + self color: Color black. + self setProperty: #indicateKeyboardFocus toValue: #never. + + Preferences enable: #systemWindowEmbedOK. + + titleMorph := ('Welcome to Squeak' translated asText + addAttribute: (TextColor color: Color white); + addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 20)); + yourself) asMorph. + titleMorph margins: (10@0 corner: 10@10). + titleMorph layoutFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 0) offsets: (0@ 0 corner: 0 @ titleMorph height)). + + self + initializePages; + initializeButtons; + initializeControlMorph; + initializePreviewWorld. + + self + changeProportionalLayout; + layoutInset: 20; + cellInset: 10; + addAllMorphs: {titleMorph. buttonRowMorph. controlMorph. previewWorld. startButton. skipButton}. + + self addKeyboardCaptureFilter: self.! Item was added: + ----- Method: PreferenceWizardMorph>>initializeButtons (in category 'initialization') ----- + initializeButtons + + buttonRowMorph := Morph new + color: Color transparent; + changeTableLayout; + listDirection: #leftToRight; + cellInset: 10; + layoutInset: (0@20 corner: 0@0); + vResizing: #shrinkWrap; + hResizing: #spaceFill; + yourself. + + buttonRowMorph addAllMorphs: { + previousButton := self createButton action: #previous; label: 'Previous' translated. + pagesLabel := (self createLabel: '0 / 0') hResizing: #shrinkWrap; margins: (20@0 corner: 20@0); fullBounds; yourself. + nextButton := self createButton action: #next; label: 'Next' translated. + self createHorizontalSpacer. + self createButton action: #showSqueak; label: 'Done' translated}. + + + buttonRowMorph fullBounds. + buttonRowMorph layoutFrame: (LayoutFrame fractions: (0 @ 1 corner: 1 @ 1) offsets: (0@ buttonRowMorph height negated corner: 0 @ 0)). + + + + startButton := (self createButton action: #showPlayfield; label: 'Continue' translated). + startButton layoutFrame: (LayoutFrame fractions: (0 @ 0.5 corner: 1 @ 0.5) offsets: (0@ 0 corner: 0 @ (titleMorph height * 4))). + skipButton := (self createButton action: #showSqueak; label: 'Skip' translated; borderWidth: 0; color: Color black). + skipButton layoutFrame: (LayoutFrame fractions: (1@1 corner: 1@1) offsets: (skipButton fullBounds width negated @ skipButton fullBounds height negated corner: 0@0)). + ! Item was added: + ----- Method: PreferenceWizardMorph>>initializeControlMorph (in category 'initialization') ----- + initializeControlMorph + + controlMorph := Morph new + color: Color transparent; + changeTableLayout; + listDirection: #topToBottom; + hResizing: #spaceFill; + vResizing: #spaceFill; + layoutInset: (0@0 corner: 10@0); + layoutFrame: (LayoutFrame fractions: (0.0 @ 0 corner: 0.3 @ 1.0) offsets: (0@ titleMorph height corner: 0 @ buttonRowMorph height negated)); + yourself. + + controlMorph addMorph: (self createLabel: 'Please take a few minutes and configure the look-and-feel of the environment. You can adjust these settings later if you like.\\You can try out the current settings in the right area.' withCRs).! Item was added: + ----- Method: PreferenceWizardMorph>>initializePage01Themes (in category 'initialization') ----- + initializePage01Themes + + | currentPage | + currentPage := pages add: self createPage. + currentPage addMorphBack: (self createLabel: 'Choose a theme:' color: Color white). + (UserInterfaceTheme allThemes asArray sortBy: [:a :b | a name <= b name]) do: [:ea | + currentPage addMorphBack: (self createButton + label: ea name; + hResizing: #spaceFill; + action: #chooseTheme:; + arguments: {ea})]. + currentPage addMorphBack: self createVerticalSpacer. + ! Item was added: + ----- Method: PreferenceWizardMorph>>initializePage02Visuals (in category 'initialization') ----- + initializePage02Visuals + + | currentPage | + currentPage := pages add: self createPage. + currentPage addMorphBack: (self createLabel: 'Choose visual settings' color: Color white). + + + currentPage addAllMorphsBack: { + self createCheckbox: 'Colorful windows' translated for: #UseColorfulWindows. + self createCheckbox: 'Flat widget look' translated for: #Gradients. + self createVerticalSpace. + self createCheckbox: 'Rounded windows' translated for: #RoundedWindowLook. + self createCheckbox: 'Rounded buttons' translated for: #RoundedButtonLook. + self createVerticalSpace. + self createCheckbox: 'Soft shadows' translated for: #SoftShadows. + self createCheckbox: 'Hard shadows' translated for: #HardShadows. + self createVerticalSpace. + self createCheckbox: 'Fast drag and resize' translated for: #FastDrag. + self createCheckbox: 'Blinking text cursor' translated for: #BlinkingCursor. + self createCheckbox: 'Show keyboard focus' translated for: #ShowKeyboardFocus. + self createCheckbox: 'Simple edit indication' translated for: #SimpleFrameAdornments. + }. + + currentPage addMorphBack: self createVerticalSpacer. + ! Item was added: + ----- Method: PreferenceWizardMorph>>initializePage03Interaction (in category 'initialization') ----- + initializePage03Interaction + + | currentPage | + currentPage := pages add: self createPage. + currentPage addMorphBack: (self createLabel: 'Choose interaction settings' color: Color white). + + + currentPage addAllMorphsBack: { + self createCheckbox: 'Swap mouse buttons' translated for: #SwapMouseButtons. + self createCheckbox: 'Focus follows mouse' translated for: #FocusFollowsMouse. + self createCheckbox: 'Mouse wheel to focus' translated for: #SendMouseWheelToKeyboardFocus. + self createVerticalSpace. + self createCheckbox: 'Auto enclose brackets' translated for: #AutoEnclose. + self createCheckbox: 'Auto indent lines' translated for: #AutoIndent. + self createCheckbox: 'Enclose text selections' translated for: #EncloseSelection. + self createVerticalSpace. + self createCheckbox: 'Arrows in scrollbar' translated for: #ScrollBarsWithoutArrowButtons. + self createCheckbox: 'Menu in scrollbar' translated for: #ScrollBarsWithoutMenuButton. + self createCheckbox: 'Scrollbars on the right' translated for: #ScrollBarsOnRight. + self createCheckbox: 'Retractable scrollbars' translated for: #UseRetractableScrollBars. + self createCheckbox: 'Narrow scrollbars' translated for: #ScrollBarsNarrow. + + }. + + currentPage addMorphBack: self createVerticalSpacer. + ! Item was added: + ----- Method: PreferenceWizardMorph>>initializePage04InteractionMore (in category 'initialization') ----- + initializePage04InteractionMore + + | currentPage | + currentPage := pages add: self createPage. + currentPage addMorphBack: (self createLabel: 'Choose more interaction settings' color: Color white). + + + currentPage addAllMorphsBack: { + self createCheckbox: 'Windows raise on click' translated for: #WindowsRaiseOnClick. + self createCheckbox: 'Windows always active' for: #WindowsAlwaysActive. + self createCheckbox: 'Window buttons always active' translated for: #WindowButtonsAlwaysActive. + self createVerticalSpace. + self createCheckbox: 'Smart horizontal splitters' translated for: #SmartHorizontalSplitters. + self createCheckbox: 'Smart vertical splitters' translated for: #SmartVerticalSplitters. + self createVerticalSpace. + self createCheckbox: 'Filterable lists and trees' translated for: #FilterableLists. + self createCheckbox: 'Filters clear if unfocused' translated for: #ClearFilterAutomatically. + }. + + currentPage addMorphBack: self createVerticalSpacer. + ! Item was added: + ----- Method: PreferenceWizardMorph>>initializePage05Tools (in category 'initialization') ----- + initializePage05Tools + + | currentPage | + currentPage := pages add: self createPage. + currentPage addMorphBack: (self createLabel: 'Choose other settings' color: Color white). + + + currentPage addAllMorphsBack: { + self createCheckbox: 'Trace messages browser' translated for: #TraceMessages. + self createCheckbox: 'Reuse tool windows' translated for: #ReuseWindows. + self createCheckbox: 'Tool and menu icons' translated for: #ToolAndMenuIcons. + }. + + currentPage addMorphBack: self createVerticalSpacer. + ! Item was added: + ----- Method: PreferenceWizardMorph>>initializePages (in category 'initialization') ----- + initializePages + + pages := OrderedCollection new. + currentPageIndex := 0. + + self + initializePage01Themes; + initializePage02Visuals; + initializePage03Interaction; + initializePage04InteractionMore; + initializePage05Tools.! Item was added: + ----- Method: PreferenceWizardMorph>>initializePreviewWorld (in category 'initialization') ----- + initializePreviewWorld + + | w1 w2 w3 | + + previewWorld := PasteUpMorph new + hResizing: #spaceFill; + vResizing: #spaceFill; + viewBox: (0@0 corner: 500@500); + layoutFrame: (LayoutFrame fractions: (0.3 @ 0 corner: 1.0 @ 1.0) offsets: (0@ titleMorph height corner: 0 @ buttonRowMorph height negated)); + fillStyle: ActiveWorld fillStyle; + borderWidth: 2; + borderColor: Color white; + cornerStyle: #rounded; + yourself. + + w1 := ToolBuilder open: (Browser new setClass: Morph selector: #drawOn:). + w2 := ToolSet browseMessageSet: (SystemNavigation default allCallsOn: #negated) name: 'Senders' translated autoSelect: 'negated'. + w3 := (Workspace new contents: '3+4 "Select and hit [CMD]+[P]."') openLabel: 'Workspace'. + + {w1. w2. w3} do: [:ea | + ea makeUnclosable. + previewWorld addMorph: ea]. + + self updateWindowBounds.! Item was added: + ----- Method: PreferenceWizardMorph>>intoWorld: (in category 'initialization') ----- + intoWorld: world + + super intoWorld: world. + + self bounds: world bounds. + + self fullBounds. + self updateWindowBounds. + + world activeHand newKeyboardFocus: self. + + self showWelcome.! Item was added: + ----- Method: PreferenceWizardMorph>>isInPlayfield (in category 'testing') ----- + isInPlayfield + + ^ previewWorld visible! Item was added: + ----- Method: PreferenceWizardMorph>>isInWelcome (in category 'testing') ----- + isInWelcome + + ^ startButton visible! Item was added: + ----- Method: PreferenceWizardMorph>>morphicLayerNumber (in category 'layout') ----- + morphicLayerNumber + + ^ 1! Item was added: + ----- Method: PreferenceWizardMorph>>next (in category 'actions') ----- + next + + currentPageIndex := currentPageIndex + 1 min: pages size. + + nextButton enabled: currentPageIndex < pages size. + previousButton enabled: currentPageIndex > 1. + + self updatePageLabel. + + "Remove current page." + controlMorph submorphs size > 1 ifTrue: [controlMorph submorphs last delete]. + + "Add new page." + controlMorph addMorphBack: (pages at: currentPageIndex). + self fullBounds. + (pages at: currentPageIndex) layoutChanged.! Item was added: + ----- Method: PreferenceWizardMorph>>previous (in category 'actions') ----- + previous + + currentPageIndex := currentPageIndex - 1 max: 1. + nextButton enabled: currentPageIndex < pages size. + previousButton enabled: currentPageIndex > 1. + + self updatePageLabel. + + "Remove current page." + controlMorph submorphs last delete. + + "Add new page." + controlMorph addMorphBack: (pages at: currentPageIndex).! Item was added: + ----- Method: PreferenceWizardMorph>>showPlayfield (in category 'actions') ----- + showPlayfield + + startButton hide. + skipButton hide. + self refreshWorld. + (Delay forMilliseconds: 1000) wait. + + + titleMorph layoutFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 0) offsets: (0@ 0 corner: 0 @ titleMorph height)). + self refreshWorld. + (Delay forMilliseconds: 1000) wait. + + + controlMorph show. + self refreshWorld. + (Delay forMilliseconds: 1000) wait. + + previewWorld show. + self refreshWorld. + (Delay forMilliseconds: 1000) wait. + + buttonRowMorph show. + self next. + self refreshWorld. + + ! Item was added: + ----- Method: PreferenceWizardMorph>>showSqueak (in category 'actions') ----- + showSqueak + + self isInWelcome ifTrue: [ + startButton hide. + skipButton hide. + self refreshWorld. + (Delay forMilliseconds: 1000) wait. + titleMorph hide. + self refreshWorld. + (Delay forMilliseconds: 1000) wait. + ^ self delete]. + + buttonRowMorph hide. + self refreshWorld. + (Delay forMilliseconds: 1000) wait. + + controlMorph hide. + self refreshWorld. + (Delay forMilliseconds: 1000) wait. + + previewWorld hide. + self refreshWorld. + (Delay forMilliseconds: 1000) wait. + + + titleMorph layoutFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)). + self refreshWorld. + (Delay forMilliseconds: 1000) wait. + self delete.! Item was added: + ----- Method: PreferenceWizardMorph>>showWelcome (in category 'actions') ----- + showWelcome + + titleMorph layoutFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)). + + controlMorph hide. + previewWorld hide. + buttonRowMorph hide. + titleMorph hide. + startButton hide. + skipButton hide. + + self refreshWorld. + + (Delay forMilliseconds: 1000) wait. + titleMorph show. + self refreshWorld. + + + (Delay forMilliseconds: 1000) wait. + startButton show. + skipButton show. + self refreshWorld. + ! Item was added: + ----- Method: PreferenceWizardMorph>>stateAutoEnclose (in category 'buttons') ----- + stateAutoEnclose + + ^ TextEditor autoEnclose! Item was added: + ----- Method: PreferenceWizardMorph>>stateAutoIndent (in category 'buttons') ----- + stateAutoIndent + + ^ TextEditor autoIndent! Item was added: + ----- Method: PreferenceWizardMorph>>stateBlinkingCursor (in category 'buttons') ----- + stateBlinkingCursor + + ^ TextEditor blinkingCursor! Item was added: + ----- Method: PreferenceWizardMorph>>stateClearFilterAutomatically (in category 'buttons') ----- + stateClearFilterAutomatically + + ^ PluggableListMorph clearFilterAutomatically! Item was added: + ----- Method: PreferenceWizardMorph>>stateEncloseSelection (in category 'buttons') ----- + stateEncloseSelection + + ^ TextEditor encloseSelection! Item was added: + ----- Method: PreferenceWizardMorph>>stateFastDrag (in category 'buttons') ----- + stateFastDrag + + ^ Preferences valueOfFlag: #fastDragWindowForMorphic ifAbsent: [false]! Item was added: + ----- Method: PreferenceWizardMorph>>stateFilterableLists (in category 'buttons') ----- + stateFilterableLists + + ^ PluggableListMorph filterableLists! Item was added: + ----- Method: PreferenceWizardMorph>>stateFocusFollowsMouse (in category 'buttons') ----- + stateFocusFollowsMouse + + ^ Preferences valueOfFlag: #mouseOverForKeyboardFocus ifAbsent: [false]! Item was added: + ----- Method: PreferenceWizardMorph>>stateGradients (in category 'buttons') ----- + stateGradients + + ^ SystemWindow gradientWindow not! Item was added: + ----- Method: PreferenceWizardMorph>>stateHardShadows (in category 'buttons') ----- + stateHardShadows + + ^ (Preferences valueOfFlag: #menuAppearance3d ifAbsent: [false]) and: [Morph useSoftDropShadow not]! Item was added: + ----- Method: PreferenceWizardMorph>>stateReuseWindows (in category 'buttons') ----- + stateReuseWindows + + ^ SystemWindow reuseWindows! Item was added: + ----- Method: PreferenceWizardMorph>>stateRoundedButtonLook (in category 'buttons') ----- + stateRoundedButtonLook + + ^ PluggableButtonMorph roundedButtonCorners! Item was added: + ----- Method: PreferenceWizardMorph>>stateRoundedWindowLook (in category 'buttons') ----- + stateRoundedWindowLook + + ^ SystemWindow roundedWindowCorners! Item was added: + ----- Method: PreferenceWizardMorph>>stateScrollBarsNarrow (in category 'buttons') ----- + stateScrollBarsNarrow + + ^ Preferences valueOfPreference: #scrollBarsNarrow ifAbsent: [false]! Item was added: + ----- Method: PreferenceWizardMorph>>stateScrollBarsOnRight (in category 'buttons') ----- + stateScrollBarsOnRight + + ^ Preferences valueOfFlag: #scrollBarsOnRight ifAbsent: [false]! Item was added: + ----- Method: PreferenceWizardMorph>>stateScrollBarsWithoutArrowButtons (in category 'buttons') ----- + stateScrollBarsWithoutArrowButtons + + ^ ScrollBar scrollBarsWithoutArrowButtons not! Item was added: + ----- Method: PreferenceWizardMorph>>stateScrollBarsWithoutMenuButton (in category 'buttons') ----- + stateScrollBarsWithoutMenuButton + + ^ ScrollBar scrollBarsWithoutMenuButton not! Item was added: + ----- Method: PreferenceWizardMorph>>stateSendMouseWheelToKeyboardFocus (in category 'buttons') ----- + stateSendMouseWheelToKeyboardFocus + + ^ HandMorph sendMouseWheelToKeyboardFocus! Item was added: + ----- Method: PreferenceWizardMorph>>stateShowKeyboardFocus (in category 'buttons') ----- + stateShowKeyboardFocus + + ^ Morph indicateKeyboardFocus! Item was added: + ----- Method: PreferenceWizardMorph>>stateSimpleFrameAdornments (in category 'buttons') ----- + stateSimpleFrameAdornments + + ^ PluggableTextMorph simpleFrameAdornments! Item was added: + ----- Method: PreferenceWizardMorph>>stateSmartHorizontalSplitters (in category 'buttons') ----- + stateSmartHorizontalSplitters + + ^ ProportionalSplitterMorph smartHorizontalSplitters! Item was added: + ----- Method: PreferenceWizardMorph>>stateSmartVerticalSplitters (in category 'buttons') ----- + stateSmartVerticalSplitters + + ^ ProportionalSplitterMorph smartVerticalSplitters! Item was added: + ----- Method: PreferenceWizardMorph>>stateSoftShadows (in category 'buttons') ----- + stateSoftShadows + + ^ (Preferences valueOfFlag: #menuAppearance3d ifAbsent: [false]) and: [Morph useSoftDropShadow]! Item was added: + ----- Method: PreferenceWizardMorph>>stateSwapMouseButtons (in category 'buttons') ----- + stateSwapMouseButtons + + ^ Preferences valueOfFlag: #swapMouseButtons ifAbsent: [false]! Item was added: + ----- Method: PreferenceWizardMorph>>stateToolAndMenuIcons (in category 'buttons') ----- + stateToolAndMenuIcons + + ^ Browser showClassIcons! Item was added: + ----- Method: PreferenceWizardMorph>>stateTraceMessages (in category 'buttons') ----- + stateTraceMessages + + ^ Preferences valueOfFlag: #traceMessages ifAbsent: [false]! Item was added: + ----- Method: PreferenceWizardMorph>>stateUseColorfulWindows (in category 'buttons') ----- + stateUseColorfulWindows + + ^ Model useColorfulWindows! Item was added: + ----- Method: PreferenceWizardMorph>>stateUseRetractableScrollBars (in category 'buttons') ----- + stateUseRetractableScrollBars + + ^ ScrollPane useRetractableScrollBars! Item was added: + ----- Method: PreferenceWizardMorph>>stateWindowButtonsAlwaysActive (in category 'buttons') ----- + stateWindowButtonsAlwaysActive + + ^ SystemWindow windowTitleActiveOnFirstClick! Item was added: + ----- Method: PreferenceWizardMorph>>stateWindowsAlwaysActive (in category 'buttons') ----- + stateWindowsAlwaysActive + + ^ Model windowActiveOnFirstClick! Item was added: + ----- Method: PreferenceWizardMorph>>stateWindowsRaiseOnClick (in category 'buttons') ----- + stateWindowsRaiseOnClick + + ^ SystemWindow windowsRaiseOnClick! Item was added: + ----- Method: PreferenceWizardMorph>>step (in category 'stepping and presenter') ----- + step + + | oldBounds | + self comeToFront. + + oldBounds := self bounds. + self bounds: self world bounds. + self bounds = oldBounds ifFalse: [ + self updateWindowBounds].! Item was added: + ----- Method: PreferenceWizardMorph>>stepTime (in category 'testing') ----- + stepTime + ^ 1000! Item was added: + ----- Method: PreferenceWizardMorph>>toggleAutoEnclose (in category 'buttons') ----- + toggleAutoEnclose + + TextEditor autoEnclose: TextEditor autoEnclose not. + self changed: #stateAutoEnclose.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleAutoIndent (in category 'buttons') ----- + toggleAutoIndent + + TextEditor autoIndent: TextEditor autoIndent not. + self changed: #stateAutoIndent.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleBlinkingCursor (in category 'buttons') ----- + toggleBlinkingCursor + + TextEditor blinkingCursor: TextEditor blinkingCursor not. + + TextMorph allSubInstancesDo: [:ea | + ea stopBlinking. + ea hasFocus ifTrue: [ + Editor blinkingCursor + ifTrue: [ea startBlinking] + ifFalse: [ea resetBlinkCursor "ensure caret visible"]]]. + + self changed: #stateBlinkingCursor.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleClearFilterAutomatically (in category 'buttons') ----- + toggleClearFilterAutomatically + + PluggableListMorph clearFilterAutomatically: PluggableListMorph clearFilterAutomatically not. + self changed: #stateClearFilterAutomatically.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleEncloseSelection (in category 'buttons') ----- + toggleEncloseSelection + + TextEditor encloseSelection: TextEditor encloseSelection not. + self changed: #stateEncloseSelection.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleFastDrag (in category 'buttons') ----- + toggleFastDrag + + Preferences toggle: #fastDragWindowForMorphic. + self changed: #stateFastDrag.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleFilterableLists (in category 'buttons') ----- + toggleFilterableLists + + PluggableListMorph filterableLists: PluggableListMorph filterableLists not. + self changed: #stateFilterableLists.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleFocusFollowsMouse (in category 'buttons') ----- + toggleFocusFollowsMouse + + Preferences toggle: #mouseOverForKeyboardFocus. + self changed: #stateFocusFollowsMouse.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleGradients (in category 'buttons') ----- + toggleGradients + + | switch | + switch := SystemWindow gradientWindow not. + + SystemWindow gradientWindow: switch. + DialogWindow gradientDialog: switch. + MenuMorph gradientMenu: switch. + ScrollBar gradientScrollBar: switch. + PluggableButtonMorph gradientButton: switch. + + self changed: #stateGradients.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleHardShadows (in category 'buttons') ----- + toggleHardShadows + + self stateSoftShadows + ifFalse: [Preferences toggle: #menuAppearance3d]. + + Morph useSoftDropShadow: false. + + SystemWindow refreshAllWindows; reconfigureWindowsForFocus. + SystemProgressMorph reset. + TheWorldMainDockingBar updateInstances. + + self changed: #stateSoftShadows. + self changed: #stateHardShadows.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleReuseWindows (in category 'buttons') ----- + toggleReuseWindows + + SystemWindow reuseWindows: SystemWindow reuseWindows not. + self changed: #stateReuseWindows.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleRoundedButtonLook (in category 'buttons') ----- + toggleRoundedButtonLook + + | switch | + switch := PluggableButtonMorph roundedButtonCorners not. + + PluggableButtonMorph roundedButtonCorners: switch. + ScrollBar roundedScrollBarLook: switch. + + self changed: #stateRoundedButtonLook.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleRoundedWindowLook (in category 'buttons') ----- + toggleRoundedWindowLook + + | switch | + switch := SystemWindow roundedWindowCorners not. + + SystemWindow roundedWindowCorners: switch. + DialogWindow roundedDialogCorners: switch. + MenuMorph roundedMenuCorners: switch. + + self changed: #stateRoundedWindowLook.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleScrollBarsNarrow (in category 'buttons') ----- + toggleScrollBarsNarrow + + Preferences toggle: #scrollBarsNarrow. + ScrollPane allSubInstancesDo: [:ea | ea scrollBarThickness: ScrollPane scrollBarThickness]. + self changed: #stateScrollBarsNarrow.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleScrollBarsOnRight (in category 'buttons') ----- + toggleScrollBarsOnRight + + Preferences toggle: #scrollBarsOnRight. + ScrollPane allSubInstancesDo: [:ea | ea scrollBarOnLeft: self stateScrollBarsOnRight not]. + self changed: #stateScrollBarsOnRight.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleScrollBarsWithoutArrowButtons (in category 'buttons') ----- + toggleScrollBarsWithoutArrowButtons + + ScrollBar scrollBarsWithoutArrowButtons: ScrollBar scrollBarsWithoutArrowButtons not. + self changed: #stateScrollBarsWithoutArrowButtons.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleScrollBarsWithoutMenuButton (in category 'buttons') ----- + toggleScrollBarsWithoutMenuButton + + ScrollBar scrollBarsWithoutMenuButton: ScrollBar scrollBarsWithoutMenuButton not. + self changed: #stateScrollBarsWithoutMenuButton.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleSendMouseWheelToKeyboardFocus (in category 'buttons') ----- + toggleSendMouseWheelToKeyboardFocus + + HandMorph sendMouseWheelToKeyboardFocus: HandMorph sendMouseWheelToKeyboardFocus not. + self changed: #stateSendMouseWheelToKeyboardFocus.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleShowKeyboardFocus (in category 'buttons') ----- + toggleShowKeyboardFocus + + Morph indicateKeyboardFocus: Morph indicateKeyboardFocus not. + self changed: #stateShowKeyboardFocus.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleSimpleFrameAdornments (in category 'buttons') ----- + toggleSimpleFrameAdornments + + PluggableTextMorph simpleFrameAdornments: PluggableTextMorph simpleFrameAdornments not. + self changed: #stateSimpleFrameAdornments.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleSmartHorizontalSplitters (in category 'buttons') ----- + toggleSmartHorizontalSplitters + + ProportionalSplitterMorph smartHorizontalSplitters: ProportionalSplitterMorph smartHorizontalSplitters not. + self changed: #stateSmartHorizontalSplitters.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleSmartVerticalSplitters (in category 'buttons') ----- + toggleSmartVerticalSplitters + + ProportionalSplitterMorph smartVerticalSplitters: ProportionalSplitterMorph smartVerticalSplitters not. + self changed: #stateSmartVerticalSplitters.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleSoftShadows (in category 'buttons') ----- + toggleSoftShadows + + self stateHardShadows + ifFalse: [Preferences toggle: #menuAppearance3d]. + + Morph useSoftDropShadow: true. + + SystemWindow refreshAllWindows; reconfigureWindowsForFocus. + SystemProgressMorph reset. + TheWorldMainDockingBar updateInstances. + + self changed: #stateSoftShadows. + self changed: #stateHardShadows.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleSwapMouseButtons (in category 'buttons') ----- + toggleSwapMouseButtons + + Preferences toggle: #swapMouseButtons. + self changed: #stateSwapMouseButtons.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleToolAndMenuIcons (in category 'buttons') ----- + toggleToolAndMenuIcons + + | switch | + switch := Browser showClassIcons not. + + Browser showClassIcons: switch. + Browser showMessageIcons: switch. + Preferences setFlag: #menuWithIcons toValue: switch. + Preferences setFlag: #visualExplorer toValue: switch. + + self changed: #stateToolAndMenuIcons.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleTraceMessages (in category 'buttons') ----- + toggleTraceMessages + + Preferences toggle: #traceMessages. + self changed: #stateTraceMessages.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleUseColorfulWindows (in category 'buttons') ----- + toggleUseColorfulWindows + + Model useColorfulWindows: Model useColorfulWindows not. + self changed: #stateUseColorfulWindows.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleUseRetractableScrollBars (in category 'buttons') ----- + toggleUseRetractableScrollBars + + ScrollPane useRetractableScrollBars: ScrollPane useRetractableScrollBars not. + self changed: #stateUseRetractableScrollBars.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleWindowButtonsAlwaysActive (in category 'buttons') ----- + toggleWindowButtonsAlwaysActive + + SystemWindow windowTitleActiveOnFirstClick: SystemWindow windowTitleActiveOnFirstClick not. + self changed: #stateWindowButtonsAlwaysActive.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleWindowsAlwaysActive (in category 'buttons') ----- + toggleWindowsAlwaysActive + + Model windowActiveOnFirstClick: Model windowActiveOnFirstClick not. + self changed: #stateWindowsAlwaysActive.! Item was added: + ----- Method: PreferenceWizardMorph>>toggleWindowsRaiseOnClick (in category 'buttons') ----- + toggleWindowsRaiseOnClick + + SystemWindow windowsRaiseOnClick: SystemWindow windowsRaiseOnClick not. + self changed: #stateWindowsRaiseOnClick.! Item was added: + ----- Method: PreferenceWizardMorph>>updatePageLabel (in category 'layout') ----- + updatePageLabel + + pagesLabel contentsAsIs: (('{1} / {2}' format: {currentPageIndex. pages size}) asText + addAttribute: (TextColor color: (Color gray: 0.8)); + addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 12))).! Item was added: + ----- Method: PreferenceWizardMorph>>updateWindowBounds (in category 'layout') ----- + updateWindowBounds + + | windows offset | + windows := previewWorld submorphs. + offset := 50@50. + + windows reversed do: [:ea | + ea + topLeft: previewWorld topLeft + offset; + extent: previewWorld extent // 3 * 2. + offset := offset + (50@50)].! |
Free forum by Nabble | Edit this page |