The Trunk: Morphic-mt.1214.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-mt.1214.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1214.mcz

==================== Summary ====================

Name: Morphic-mt.1214
Author: mt
Time: 31 July 2016, 11:29:46.133418 am
UUID: 0a02a7cb-3826-8d4f-9069-2b6b84a827ae
Ancestors: Morphic-mt.1213

*** Widget Refactorings and UI Themes (Part 8 of 11) ***

Adds minimal tool support for UI themes to world main docking bar's EXTRAS menu.

=============== Diff against Morphic-mt.1213 ===============

Item was changed:
  ----- Method: MenuMorph class>>gradientMenu: (in category 'preferences') -----
  gradientMenu: aBoolean
 
+ GradientMenu = aBoolean ifTrue: [^ self].
  GradientMenu := aBoolean.
+
+ self flag: #refactor. "mt: Heavy use of the gradient-menu property..."
- SystemProgressMorph reset.
 
+ SystemProgressMorph reset.
+ PluggableTextMorph flushAdornmentCache.
+
+ MenuMorph allSubInstancesDo: [:ea | ea setDefaultParameters; setTitleParameters; updateColor].
+ DockingBarMorph allSubInstancesDo: [:ea | ea setDefaultParameters; updateColor].
+
+ TheWorldMainDockingBar updateInstances.
+ PluggableListMorph allSubInstancesDo: [:ea | ea setListParameters].
+ SimpleHierarchicalListMorph allSubInstancesDo: [:ea | ea setDefaultParameters].
+ !
- "Update docking bars and their sub-menus."
- ActiveWorld mainDockingBars do: [:bar |
- bar
- autoGradient: aBoolean;
- updateColor].
- TheWorldMainDockingBar updateInstances.!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>editCurrentTheme (in category 'submenu - extras') -----
+ editCurrentTheme
+
+ UserInterfaceTheme current explore.!

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 addLine.
  menu addItem:[:item|
  item
+ contents: 'Themes & Colors' translated;
+ subMenuUpdater: self
+ selector: #themesAndWindowColorsOn: ].
- contents: 'Window Colors' translated;
- help: 'Changes the window color scheme' translated;
- addSubMenu:[:submenu| self windowColorsOn: submenu]].
  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>>themesAndWindowColorsOn: (in category 'submenu - extras') -----
+ themesAndWindowColorsOn: menu
+
+ | themes |
+ themes := UserInterfaceTheme allThemes asArray sortBy: [:t1 :t2 |
+ t1 name <= t2 name].
+
+ 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 addItem:[:item |
+ item
+ contents: ((Preferences valueOfFlag: #menuAppearance3d) ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Shadows' translated;
+ target: self;
+ selector: #toggleShadows].
+ menu addItem:[:item |
+ item
+ contents: (SystemWindow roundedWindowCorners ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Rounded Widget Look' translated;
+ target: self;
+ selector: #toggleRoundedLook].
+
+
+ menu addLine.
+
+ themes ifEmpty: [
+ menu addItem: [ :item |
+ item
+ contents: '(No UI themes found.)' translated;
+ isEnabled: false ] ].
+ themes do: [ :each |
+ menu addItem: [ :item |
+ item
+ contents: (UserInterfaceTheme current == each ifTrue: ['<yes>'] ifFalse: ['<no>']), each name;
+ target: each;
+ selector: #apply ] ].
+ menu
+ addLine;
+ add: 'Edit Current UI Theme...' target: self selector: #editCurrentTheme.!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>toggleColorfulWindows (in category 'submenu - extras') -----
+ toggleColorfulWindows
+
+ Model useColorfulWindows: Model useColorfulWindows not.!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>toggleGradients (in category 'submenu - extras') -----
+ toggleGradients
+
+ | switch |
+ switch := SystemWindow gradientWindow not.
+
+ SystemWindow gradientWindow: switch.
+ DialogWindow gradientDialog: switch.
+ MenuMorph gradientMenu: switch.
+ ScrollBar gradientScrollBar: switch.
+ PluggableButtonMorph gradientButton: switch.!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>toggleRoundedLook (in category 'submenu - extras') -----
+ toggleRoundedLook
+
+ | switch |
+ switch := SystemWindow roundedWindowCorners not.
+
+ SystemWindow roundedWindowCorners: switch.
+ DialogWindow roundedDialogCorners: switch.
+ PluggableButtonMorph roundedButtonCorners: switch.
+ MenuMorph roundedMenuCorners: switch.
+ ScrollBar roundedScrollBarLook: switch.!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>toggleShadows (in category 'submenu - extras') -----
+ toggleShadows
+
+ Preferences toggle: #menuAppearance3d.!

Item was removed:
- ----- Method: TheWorldMainDockingBar>>windowColorsOn: (in category 'construction') -----
- windowColorsOn: menu
-
- menu addItem:[:item|
- item
- contents: 'Gray Windows' translated;
- help: 'Use uniform window colors' translated;
- target: Preferences;
- selector: #installUniformWindowColors].
-
- menu addItem:[:item|
- item
- contents: 'Colorful Windows' translated;
- help: 'Use normal window colors' translated;
- target: Preferences;
- selector: #installNormalWindowColors].
-
- menu addLine.
-
- menu addItem:[:item|
- item
- contents: 'Bright-colored Windows' translated;
- help: 'Use bright window colors' translated;
- target: Preferences;
- selector: #installBrightWindowColors].
-
- menu addItem:[:item|
- item
- contents: 'Pastel-colored Windows' translated;
- help: 'Use pastel window colors' translated;
- target: Preferences;
- selector: #installPastelWindowColors].
- !

Item was changed:
+ (PackageInfo named: 'Morphic') postscript: 'TheWorldMainDockingBar updateInstances.'!
- (PackageInfo named: 'Morphic') postscript: 'ScrollBar initializeImagesCache.
- LazyListMorph allSubInstancesDo: [:ea | ea resetFilterOffsets].
- PluggableTextMorph flushAdornmentCache.'!