[squeak-dev] The Trunk: Morphic-mt.1837.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Dec 30 15:23:46 UTC 2021
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1837.mcz
==================== Summary ====================
Name: Morphic-mt.1837
Author: mt
Time: 30 December 2021, 4:23:41.536748 pm
UUID: 45a76a8e-1cf7-0944-8f69-cc3d121f6e9c
Ancestors: Morphic-mt.1836
Complements Graphics-mt.455
=============== Diff against Morphic-mt.1836 ===============
Item was added:
+ ----- Method: MorphicProject>>displayScaleChangedFrom:to: (in category 'display') -----
+ displayScaleChangedFrom: oldFactor to: newFactor
+ "Update Morphic-specific geometry. Try to be more efficient than UI theme's #applyUserInterfaceTheme."
+
+ super displayScaleChangedFrom: oldFactor to: newFactor.
+
+ "Switching UI themes involves updating geometry for different fonts anyway. Maybe we can speed up this at some point by avoiding to refresh non-geometry properties such as colors."
+ UserInterfaceTheme current
+ basicApply;
+ scaleMorphicToolsBy: newFactor / oldFactor.
+ !
Item was added:
+ ----- Method: TheWorldMainDockingBar>>chooseCustomScaleFactor (in category 'submenu - extras') -----
+ chooseCustomScaleFactor
+
+ | result |
+ result := Project uiManager request: 'Please enter a scale factor in %' translated initialAnswer: '350'.
+ result ifEmpty: [^ self].
+ [result := result asInteger abs] ifError: [^ self].
+ result < 100 ifTrue: [^ self].
+ Display relativeUiScaleFactor: result / 100.!
Item was changed:
----- Method: TheWorldMainDockingBar>>extrasMenuOn: (in category 'submenu - extras') -----
extrasMenuOn: aDockingBar
aDockingBar addItem: [ :it|
it contents: 'Extras' translated;
addSubMenu: [:menu|
menu addItem:[:item|
item
contents: 'Recover Changes' translated;
help: 'Recover changes after a crash' translated;
icon: MenuIcons smallDocumentClockIcon;
target: ChangeList;
selector: #browseRecentLog].
menu addItem:[:item|
item
contents: 'Recover Method Versions' translated;
help: 'Recover versions of deleted methods' translated;
target: ChangeList;
selector: #browseMethodVersions].
menu addLine.
menu addItem:[:item|
item
contents: 'Themes & Colors' translated;
subMenuUpdater: self
selector: #themesAndWindowColorsOn: ].
menu addItem:[:item|
item
+ contents: 'Scale Factor' translated;
+ subMenuUpdater: self
+ selector: #scaleFactorsOn:].
+ menu addItem:[:item|
+ item
contents: 'Language' translated;
subMenuUpdater: self
selector: #languageTranslatorsOn: ].
menu addItem:[:item|
item
contents: 'Set Author Initials' translated;
help: 'Sets the author initials' translated;
icon: MenuIcons smallUserQuestionIcon;
target: Utilities;
selector: #setAuthorInitials].
menu addItem:[:item|
item
contents: 'Restore Display (r)' translated;
help: 'Redraws the entire display' translated;
target: Project current;
selector: #restoreDisplay].
menu addItem:[:item|
item
contents: 'Rebuild Menus' translated;
help: 'Rebuilds the menu bar' translated;
target: TheWorldMainDockingBar;
selector: #updateInstances].
menu addLine.
menu addItem:[:item|
item
contents: 'Start Profiler' translated;
help: 'Starts the profiler' translated;
icon: MenuIcons smallTimerIcon;
target: self;
selector: #startMessageTally].
menu addItem:[:item|
item
contents: 'Collect Garbage' translated;
help: 'Run the garbage collector and report space usage' translated;
target: Utilities;
selector: #garbageCollectAndReport].
menu addItem:[:item|
item
contents: 'Purge Undo Records' translated;
help: 'Save space by removing all the undo information remembered in all projects' translated;
target: CommandHistory;
selector: #resetAllHistory].
menu addItem:[:item|
item
contents: 'VM statistics' translated;
help: 'Virtual Machine information' translated;
target: self;
selector: #vmStatistics].
menu addLine.
menu addItem:[:item|
item
contents: 'Graphical Imports' translated;
help: 'View the global repository called ImageImports; you can easily import external graphics into ImageImports via the FileList' translated;
target: (Imports default);
selector: #viewImages].
menu addItem:[:item|
item
contents: 'Standard Graphics Library' translated;
help: 'Lets you view and change the system''s standard library of graphics' translated;
target: ScriptingSystem;
selector: #inspectFormDictionary].
menu addItem:[:item|
item
contents: 'Annotation Setup' translated;
help: 'Click here to get a little window that will allow you to specify which types of annotations, in which order, you wish to see in the annotation panes of browsers and other tools' translated;
target: Preferences;
selector: #editAnnotations].
menu addItem:[:item|
item
contents: 'Browse My Changes' translated;
help: 'Browse all of my changes since the last time #condenseSources was run.' translated;
target: SystemNavigation new;
selector: #browseMyChanges].
] ]!
Item was added:
+ ----- Method: TheWorldMainDockingBar>>resetAllThemes (in category 'submenu - extras') -----
+ resetAllThemes
+
+ (Project uiManager confirm: 'Do you want to reset all UI themes\to their original state?\\(The current theme and scale factor\will be restored if possible.)' withCRs translated title: 'Reset All Themes')
+ ifTrue: [UserInterfaceTheme cleanUpAndReset].!
Item was added:
+ ----- Method: TheWorldMainDockingBar>>scaleFactorsOn: (in category 'submenu - extras') -----
+ scaleFactorsOn: menu
+
+ | presets currentScaleFactor currentPlatformScaleFactor |
+ currentScaleFactor := (Display relativeUiScaleFactor * 100) rounded.
+ currentPlatformScaleFactor := Display platformScaleFactorKnown
+ ifTrue: [(Display platformScaleFactor * 100) rounded].
+ presets := 100 to: 300 by: 25.
+
+ presets do: [:scale |
+ scale = 175 ifTrue: [menu addLine]. "TTCFont used after this line..."
+ menu addItem: [:item|
+ item
+ contents: ('{1}{2}%{3}' format: {
+ currentScaleFactor = scale ifTrue: ['<yes>'] ifFalse: ['<no>'].
+ scale.
+ DisplayScreen relativeScaleFactorEnabled
+ ifTrue: ['' "macOS"] ifFalse: [
+ scale = currentPlatformScaleFactor
+ ifTrue: [' (recommended)'] ifFalse: ['']]
+ });
+ target: Display;
+ selector: #relativeUiScaleFactor:;
+ arguments: {scale / 100}]].
+
+ menu addLine.
+ menu addItem: [:item |
+ item
+ contents: ((presets includes: currentScaleFactor) not ifTrue: ['<yes> Custom: ', currentScaleFactor, '% ...'] ifFalse: ['<no>Other scale factor...']);
+ target: self;
+ selector: #chooseCustomScaleFactor].!
Item was changed:
----- Method: TheWorldMainDockingBar>>themesAndWindowColorsOn: (in category 'submenu - extras') -----
themesAndWindowColorsOn: menu
| themes |
menu addItem:[:item|
item
+ contents: 'Fonts' translated;
+ subMenuUpdater: Preferences
+ selector: #fontConfigurationMenu:;
+ icon: MenuIcons smallFontsIcon].
+ menu addLine.
+ menu addItem:[:item|
+ item
contents: (Model useColorfulWindows ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Colorful Windows' translated;
target: self;
selector: #toggleColorfulWindows].
menu addItem:[:item|
item
contents: (SystemWindow gradientWindow not ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Flat Widget Look' translated;
target: self;
selector: #toggleGradients].
menu addLine.
menu addItem:[:item |
item
contents: (((Preferences valueOfFlag: #menuAppearance3d ifAbsent: [false]) and: [Morph useSoftDropShadow]) ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Soft Shadows' translated;
target: self;
selector: #toggleSoftShadows].
menu addItem:[:item |
item
contents: (((Preferences valueOfFlag: #menuAppearance3d ifAbsent: [false]) and: [Morph useSoftDropShadow not]) ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Hard Shadows' translated;
target: self;
selector: #toggleHardShadows].
menu addLine.
menu addItem:[:item |
item
contents: (SystemWindow roundedWindowCorners ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Rounded Window/Dialog/Menu Look' translated;
target: self;
selector: #toggleRoundedWindowLook].
menu addItem:[:item |
item
contents: (PluggableButtonMorph roundedButtonCorners ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Rounded Button/Scrollbar Look' translated;
target: self;
selector: #toggleRoundedButtonLook].
menu addLine.
themes := UserInterfaceTheme allThemes asArray sort: #name ascending.
+ themes := themes select: [ :each | each isGenuine].
themes ifEmpty: [
menu addItem: [ :item |
item
contents: '(No UI themes found.)' translated;
isEnabled: false ] ].
themes do: [ :each |
menu addItem: [ :item |
item
+ contents: (UserInterfaceTheme current name = each name ifTrue: ['<yes>'] ifFalse: ['<no>']), each name;
- contents: (UserInterfaceTheme current == each ifTrue: ['<yes>'] ifFalse: ['<no>']), each name;
target: each;
+ selector: #applyScaled ] ].
- selector: #apply ] ].
- menu
- addLine;
- add: 'Increase Font Size' translated target: Preferences selector: #increaseFontSize;
- add: 'Decrease Font Size' translated target: Preferences selector: #decreaseFontSize.
menu
addLine;
- add: 'Set High-DPI Mode' translated target: Preferences selector: #setDemoFonts;
add: 'Set Etoys Mode' translated target: ReleaseBuilderSqueakland selector: #setEtoysMode.
menu
addLine;
+ add: 'Restore UI theme background' translated target: self selector: #restoreThemeBackground;
+ add: 'Reset all UI themes' translated target: self selector: #resetAllThemes;
+ add: 'Edit current UI theme...' translated target: self selector: #editCurrentTheme.!
- add: 'Restore UI Theme Background' translated target: self selector: #restoreThemeBackground;
- add: 'Edit Current UI Theme...' translated target: self selector: #editCurrentTheme.!
Item was changed:
----- Method: WorldState>>doOneCycleNowFor: (in category 'update cycle') -----
doOneCycleNowFor: aWorld
"Immediately do one cycle of the interaction loop.
This should not be called directly, but only via doOneCycleFor:"
| capturingGesture |
+ DisplayScreen checkForNewScreenScaleFactor; checkForNewScreenSize.
- DisplayScreen checkForNewScreenSize.
capturingGesture := false.
"self flag: #bob. " "need to consider remote hands in lower worlds"
"process user input events"
LastCycleTime := Time millisecondClockValue.
self handsDo: [:hand |
hand becomeActiveDuring: [
hand processEvents.
capturingGesture := capturingGesture or: [hand isCapturingGesturePoints]]].
"The gesture recognizer needs enough points to be accurate.
Therefore morph stepping is disabled while capturing points for the recognizer"
capturingGesture ifFalse: [
aWorld runStepMethods. "there are currently some variations here"
self displayWorldSafely: aWorld].!
Item was changed:
+ (PackageInfo named: 'Morphic') postscript: '"Fix missing command key shortcuts such as [cmd]+[+/-] for scale changes."
+ Project allMorphicProjects do: [:p | p world initializeDesktopCommandKeySelectors].
+
+ "New ''scale factor'' menu"
+ TheWorldMainDockingBar updateInstances.'!
- (PackageInfo named: 'Morphic') postscript: 'Editor initialize. "Removes US-layout specific keyboard shortcuts for ''Enclose selection'' in favor of the cross-platform compatible preference ''Enclose selection with brackets''."'!
More information about the Squeak-dev
mailing list
|