[squeak-dev] The Inbox: PreferenceBrowser-ct.99.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Dec 31 01:53:16 UTC 2019
Christoph Thiede uploaded a new version of PreferenceBrowser to project The Inbox:
http://source.squeak.org/inbox/PreferenceBrowser-ct.99.mcz
==================== Summary ====================
Name: PreferenceBrowser-ct.99
Author: ct
Time: 31 December 2019, 2:53:14.748022 am
UUID: dd537552-5f25-8648-9f2c-0d83840c16a8
Ancestors: PreferenceBrowser-mt.97
Add a button to open the preference wizard from the preference browser. It's just too cool to not being reused after initial setup!
=============== Diff against PreferenceBrowser-mt.97 ===============
Item was added:
+ ----- Method: PreferenceBrowser>>wizardSelected (in category 'preferences search') -----
+ wizardSelected
+
+ PreferenceWizardMorph openPlayfield!
Item was changed:
----- Method: PreferenceBrowserMorph>>newButtonRow (in category 'submorphs - buttons') -----
newButtonRow
^BorderedMorph new
color: Color transparent;
borderWidth: 0;
cellGap: 2;
layoutInset: 2;
layoutPolicy: TableLayout new;
listDirection: #leftToRight;
listCentering: #topLeft;
cellPositioning: #topLeft;
on: #mouseEnter send: #paneTransition: to: self;
on: #mouseLeave send: #paneTransition: to: self;
addMorphBack: self defaultButton;
addMorphBack: self newSeparator;
addMorphBack: self saveButton;
addMorphBack: self loadButton;
addMorphBack: self newSeparator;
addMorphBack: self saveToDiskButton;
addMorphBack: self loadFromDiskButton;
addMorphBack: self newSeparator;
addMorphBack: self themeButton;
+ addMorphBack: self newSeparator;
+ addMorphBack: self wizardButton;
addMorphBack: self newTransparentFiller;
addMorphBack: self helpButton;
yourself.!
Item was added:
+ ----- Method: PreferenceBrowserMorph>>wizardButton (in category 'submorphs - buttons') -----
+ wizardButton
+
+ ^ wizardButton ifNil: [wizardButton :=
+ self basicButton
+ label: 'wizard' translated;
+ setBalloonText: 'The preferences wizard guides you through the most important preferences for your Squeak image.' translated;
+ action: #wizardSelected]!
Item was changed:
Morph subclass: #PreferenceWizardMorph
+ instanceVariableNames: 'previewWorld titleMorph buttonRowMorph controlMorph startButton previousButton nextButton pages currentPageIndex pagesLabel skipButton isFullScreen lowPerformanceMorph checkmark wantsInstallPage'
- instanceVariableNames: 'previewWorld titleMorph buttonRowMorph controlMorph startButton previousButton nextButton pages currentPageIndex pagesLabel skipButton isFullScreen lowPerformanceMorph checkmark'
classVariableNames: ''
poolDictionaries: ''
category: 'PreferenceBrowser'!
Item was changed:
----- Method: PreferenceWizardMorph class>>open (in category 'instance creation') -----
open
+ "PreferenceWizardMorph open"
^ PreferenceWizardMorph new openInWorld!
Item was added:
+ ----- Method: PreferenceWizardMorph class>>openPlayfield (in category 'instance creation') -----
+ openPlayfield
+ "PreferenceWizardMorph openPlayfield"
+
+ ^ PreferenceWizardMorph new openPlayfield!
Item was changed:
----- Method: PreferenceWizardMorph>>accept (in category 'actions') -----
accept
+ wantsInstallPage
+ ifTrue: [ self showInstallPage]
+ ifFalse: [self delete]!
- self showInstallPage.!
Item was changed:
----- Method: PreferenceWizardMorph>>initialize (in category 'initialization') -----
initialize
super initialize.
+ wantsInstallPage := true.
isFullScreen := false.
self hasLowPerformance
ifTrue: [self color: self defaultColor]
ifFalse: [self color: (self defaultColor alpha: 0.75)].
self setProperty: #indicateKeyboardFocus toValue: #never.
Preferences enable: #systemWindowEmbedOK.
titleMorph := ('Welcome to Squeak' translated asText
addAttribute: (TextColor color: self defaultTextColor);
addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 20));
yourself) asMorph lock.
titleMorph margins: (10 at 0 corner: 10 at 10).
titleMorph layoutFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 0) offsets: (0@ 0 corner: 0 @ titleMorph height)).
self
initializePages;
initializeButtons;
initializeControlMorph;
initializePreviewWorld;
initializeForLowPerformance.
self
changeProportionalLayout;
layoutInset: 20;
cellGap: 10;
cellPositioning: #center;
addAllMorphs: {titleMorph. buttonRowMorph. controlMorph. previewWorld. startButton. skipButton. lowPerformanceMorph}.
self addKeyboardCaptureFilter: self.!
Item was added:
+ ----- Method: PreferenceWizardMorph>>openPlayfield (in category 'initialization') -----
+ openPlayfield
+
+ wantsInstallPage := false.
+ super openInWorld.
+ self showPlayfield.!
More information about the Squeak-dev
mailing list
|