[squeak-dev] The Trunk: Morphic-mt.1627.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Feb 20 11:06:47 UTC 2020


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

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

Name: Morphic-mt.1627
Author: mt
Time: 20 February 2020, 12:06:36.90175 pm
UUID: 1ca9ce53-bee3-6640-87f4-46873a6888df
Ancestors: Morphic-mt.1625

Documents an issue in StringMorph. Makes Etoys support for 5.3 visible in the 'Extras' menu in the world main docking bar.

=============== Diff against Morphic-mt.1625 ===============

Item was changed:
  ----- Method: StringMorph>>contents: (in category 'accessing') -----
  contents: newContents 
  
+ 	self flag: #todo. "mt: hasFocus == true means that the mini editor was launched. We should now ignore any external calls to this method to avoid visual glitches. However, #interimContents: does also use this callback. Figure something out."
+ 
  	newContents isText
  		ifTrue: [^ self initializeFromText: newContents].
  
  	contents = newContents
  		ifTrue: [^ self "No substantive change."].
  
  	contents := newContents.
  	self changed. "New contents need to be drawn."
  		
  	self fitContents. "Resize if necessary."!

Item was changed:
  ----- Method: StringMorphEditor>>keyStroke: (in category 'event handling') -----
  keyStroke: evt
  	"This is hugely inefficient, but it seems to work, and it's unlikely it will ever need
  	to be any more efficient -- it's only intended to edit single-line strings."
  
  	| char priorEditor newSel |
  	(((char := evt keyCharacter) = Character enter) or: [(char = Character cr)
  			or: [char = $s and: [evt commandKeyPressed]]])
  				ifTrue: [owner doneWithEdits; acceptContents.
  	self flag: #arNote. "Probably unnecessary"
  						evt hand releaseKeyboardFocus.
  						^ self delete].
  	
+ 	((char := evt keyCharacter) = Character escape
+ 		or: [char = $l and: [evt commandKeyPressed]]) ifTrue:   "cancel"
- 	(char = $l and: [evt commandKeyPressed]) ifTrue:   "cancel"
  		[owner cancelEdits.
  		evt hand releaseKeyboardFocus.
  		^ self delete].
  
  	super keyStroke: evt.
  	
  	owner ifNil: [^self].
  	owner interimContents: self contents asString.
  	newSel := self editor selectionInterval.
  
  	priorEditor := self editor.  "Save editor state"
  	self releaseParagraph.  "Release paragraph so it will grow with selection."
  	self paragraph.      "Re-instantiate to set new bounds"
  	self installEditorToReplace: priorEditor.  "restore editor state"
  	self editor selectFrom: newSel first to: newSel last.
  !

Item was changed:
  ----- Method: TheWorldMainDockingBar>>themesAndWindowColorsOn: (in category 'submenu - extras') -----
  themesAndWindowColorsOn: menu
  	| themes |
  	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 := UserInterfaceTheme allThemes asArray sort: #name ascending.	
  	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: '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.
- 		addLine ;
- 		add: 'Increase Font Size' translated target: Preferences selector: #increaseFontSize ;
- 		add: 'Decrease Font Size' translated target: Preferences selector: #decreaseFontSize ;
- 		addLine.
  	menu
  		addLine;
  		add: 'Restore UI Theme Background' translated target: self selector: #restoreThemeBackground;
  		add: 'Edit Current UI Theme...' translated target: self selector: #editCurrentTheme.!



More information about the Squeak-dev mailing list