[squeak-dev] The Trunk: PreferenceBrowser-mt.76.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Aug 17 20:04:15 UTC 2016
Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-mt.76.mcz
==================== Summary ====================
Name: PreferenceBrowser-mt.76
Author: mt
Time: 17 August 2016, 10:04:08.954 pm
UUID: c5d085c7-a020-c54e-afea-2fcc968ec216
Ancestors: PreferenceBrowser-mt.75
Also detect low-performance for SqueakJS in Preference Wizard. Fixes some layout issues there.
=============== Diff against PreferenceBrowser-mt.75 ===============
Item was changed:
----- Method: PreferenceWizardMorph>>adjustSettingsForLowPerformance (in category 'actions') -----
adjustSettingsForLowPerformance
+ self updateLowPerformanceLabel: 'Please wait, optimizing performance...' translated.
+ self refreshWorld.
+
self stateGradients "flat look" ifFalse: [self toggleGradients].
self stateBlinkingCursor ifTrue: [self toggleBlinkingCursor].
self stateFastDrag ifFalse: [self toggleFastDrag].
self stateSoftShadows ifTrue: [self toggleSoftShadows].
self stateHardShadows ifTrue: [self toggleHardShadows].
self stateRoundedWindowLook ifTrue: [self toggleRoundedWindowLook].
self stateRoundedButtonLook ifTrue: [self toggleRoundedButtonLook].
self stateAttachToolsToMouse ifTrue: [self toggleAttachToolsToMouse].
self stateToolAndMenuIcons ifTrue: [self toggleToolAndMenuIcons].
+ self stateSmartHorizontalSplitters ifTrue: [self toggleSmartHorizontalSplitters].
+ self stateSmartVerticalSplitters ifTrue: [self toggleSmartVerticalSplitters].
+
+ PluggableListMorph highlightHoveredRow: false; filterableLists: false.
+ TheWorldMainDockingBar showSecondsInClock: false.
+ Preferences disable: #balloonHelpInMessageLists.
+
+
"Set simple background."
ActiveWorld setAsBackground: MorphicProject defaultFill.
previewWorld fillStyle: ActiveWorld fillStyle.
+
+ "Done."
+ self updateLowPerformanceLabel: 'Settings were adjusted for optimal performance.' translated.
!
Item was changed:
----- Method: PreferenceWizardMorph>>hasLowPerformance (in category 'testing') -----
hasLowPerformance
"If the wizard is started on a machine with low performance, the wizard will change some settings automatically on startup."
+ ^ (Smalltalk platformSubtype beginsWith: 'arm') "Raspberry PI"
+ or: [Smalltalk platformName = 'Web'] "SqueakJS"!
- ^ Smalltalk platformSubtype beginsWith: 'arm'!
Item was changed:
----- Method: PreferenceWizardMorph>>initializeForLowPerformance (in category 'initialization') -----
initializeForLowPerformance
+ lowPerformanceMorph := TextMorph new lock.!
- lowPerformanceMorph := ('Settings were adjusted for low performance.' translated asText
- addAttribute: (TextColor color: (Color gray: 0.7));
- addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 9));
- yourself) asMorph lock.
-
- lowPerformanceMorph layoutFrame: (LayoutFrame fractions: (1 @ 1 corner: 1 @ 1) offsets: (lowPerformanceMorph fullBounds width negated @ lowPerformanceMorph fullBounds height negated corner: 20 @ 20 "Into margins")).
-
- self hasLowPerformance ifTrue: [self adjustSettingsForLowPerformance].!
Item was removed:
- ----- Method: PreferenceWizardMorph>>intoWorld: (in category 'initialization') -----
- intoWorld: world
-
- super intoWorld: world.
-
- self bounds: world bounds.
-
- self fullBounds.
- self updateWindowBounds.
-
- world activeHand
- newKeyboardFocus: self;
- newMouseFocus: self.
-
- self showWelcome.!
Item was added:
+ ----- Method: PreferenceWizardMorph>>openInWorld (in category 'initialization') -----
+ openInWorld
+
+ super openInWorld.
+
+ self step.
+
+ self world activeHand
+ newKeyboardFocus: self;
+ newMouseFocus: self.
+
+ self showWelcome.!
Item was added:
+ ----- Method: PreferenceWizardMorph>>refreshWorld (in category 'initialization') -----
+ refreshWorld
+
+ self world layoutChanged. "To be really sure to update docking bars..."
+ self world fullBounds. "Avoid flickering..."
+ self world doOneCycle.!
Item was changed:
----- Method: PreferenceWizardMorph>>showWelcome (in category 'actions') -----
showWelcome
titleMorph layoutFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 0.65) offsets: (0 @0 corner: 0 at 0)).
isFullScreen := false.
self height: titleMorph fullBounds height * 4.
+
- self step.
- self fullBounds.
- self step.
-
controlMorph hide.
previewWorld hide.
buttonRowMorph hide.
titleMorph show.
startButton show.
skipButton show.
self hasLowPerformance
ifFalse: [lowPerformanceMorph hide]
ifTrue: [lowPerformanceMorph show].
+ self hasLowPerformance
+ ifTrue: [Cursor wait showWhile: [self adjustSettingsForLowPerformance]].
+
- self world fullBounds.
self refreshWorld.
!
Item was added:
+ ----- Method: PreferenceWizardMorph>>updateLowPerformanceLabel: (in category 'layout') -----
+ updateLowPerformanceLabel: string
+
+ lowPerformanceMorph contentsAsIs: (string asText
+ addAttribute: (TextColor color: (Color gray: 0.7));
+ addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 9))).
+
+ lowPerformanceMorph layoutFrame: (LayoutFrame fractions: (1 @ 1 corner: 1 @ 1) offsets: (lowPerformanceMorph fullBounds width negated @ lowPerformanceMorph fullBounds height negated corner: 20 @ 20 "Into margins")).
+
+ self layoutChanged.!
More information about the Squeak-dev
mailing list
|