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

commits at source.squeak.org commits at source.squeak.org
Fri Feb 11 11:12:05 UTC 2022


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

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

Name: Morphic-mt.1892
Author: mt
Time: 11 February 2022, 12:12:01.190856 pm
UUID: 1e2740a5-d5fb-304b-8c89-8f0af9000fae
Ancestors: Morphic-mt.1891

Adds two more #useCompact* preferences to retain the good old Squeak/Smalltalk style. 

By default, text fields will now make room for the keyboard-focus indication, which is especially noticeable in one-liners such as the annotation bar in browsers. Enable #useCompactTextFields: to go retro again. :-)

Also, you can now enable #useCompactButtons: to get back those small buttons in the debugger ... but everywhere. At least you have then more space for the other text/list widgets around those button bars. Especially noticeable in the debugger when you have two button bars enabled.

=============== Diff against Morphic-mt.1891 ===============

Item was changed:
  ----- Method: Morph>>drawKeyboardFocusIndicationOn: (in category 'drawing') -----
  drawKeyboardFocusIndicationOn: aCanvas
  
  	self wantsRoundedCorners
+ 		ifTrue: [aCanvas frameRoundRect: self innerBounds radius: self cornerRadius width: self keyboardFocusWidth color: self keyboardFocusColor]
+ 		ifFalse: [aCanvas frameRectangle: self innerBounds width: self keyboardFocusWidth color: self keyboardFocusColor].!
- 		ifTrue: [aCanvas frameRoundRect: self bounds radius: self cornerRadius width: self keyboardFocusWidth color: self keyboardFocusColor]
- 		ifFalse: [aCanvas frameRectangle: self bounds width: self keyboardFocusWidth color: self keyboardFocusColor].!

Item was changed:
  Project subclass: #MorphicProject
  	instanceVariableNames: 'uiProcess'
+ 	classVariableNames: 'DefaultFill HarmonizeFonts ShowResizeGrips UseCompactButtons UseCompactLists UseCompactTextFields'
+ 	poolDictionaries: 'AbstractResizerMorph'
- 	classVariableNames: 'DefaultFill UseCompactLists'
- 	poolDictionaries: ''
  	category: 'Morphic-Support'!
  
  !MorphicProject commentStamp: 'dtl 7/13/2013 15:40' prior: 0!
  An MorphicProject is a project with a Morphic user interface. Its world is a PasteUpMorph, and its UI manager is a MorphicUIManager. It uses a MorphicToolBuilder to create the views for various tools. It has a single uiProcess for its world, and Morph updates and user interaction occur in the context of that UI process.
  !

Item was added:
+ ----- Method: MorphicProject class>>useCompactButtons (in category 'preferences - accessibility') -----
+ useCompactButtons
+ 	<preference: 'Compact button widgets'
+ 		categoryList: #('Morphic' 'Tools' 'Accessibility')
+ 		description: 'When true, make the buttons only as high as the current button font with the usual extra margins.'
+ 		type: #Boolean>
+ 
+ 	^ UseCompactButtons ifNil: [false]!

Item was added:
+ ----- Method: MorphicProject class>>useCompactButtons: (in category 'preferences - accessibility') -----
+ useCompactButtons: aBooleanOrNil
+ 
+ 	UseCompactButtons = aBooleanOrNil ifTrue: [^ self].
+ 	UseCompactButtons := aBooleanOrNil.
+ 	
+ "	UserInterfaceTheme current basicApply."!

Item was changed:
+ ----- Method: MorphicProject class>>useCompactLists (in category 'preferences - accessibility') -----
- ----- Method: MorphicProject class>>useCompactLists (in category 'preferences') -----
  useCompactLists
  	<preference: 'Compact list/tree/menu widgets'
+ 		categoryList: #('Morphic' 'Tools' 'Accessibility')
+ 		description: 'When true, ignore the #lineGrid of the current list font when computing the list layout and other geometry properties. Does not interfere with the layout of text fields. Also makes the window title more compact.'
- 		categoryList: #('Morphic' 'Tools')
- 		description: 'When true, ignore the #lineGrid of the current list font when computing the list layout and other geometry properties. Does not interfere with the layout of text fields.'
  		type: #Boolean>
  
  	^ UseCompactLists ifNil: [false]!

Item was added:
+ ----- Method: MorphicProject class>>useCompactTextFields (in category 'preferences - accessibility') -----
+ useCompactTextFields
+ 	<preference: 'Compact text fields'
+ 		categoryList: #('Morphic' 'Tools' 'Accessibility')
+ 		description: 'When true, do not add extra spacing to better see the current theme''s keyboard-focus indication. Will be mostly noticeable in one-line text fields.'
+ 		type: #Boolean>
+ 
+ 	^ UseCompactTextFields ifNil: [false]!

Item was added:
+ ----- Method: MorphicProject class>>useCompactTextFields: (in category 'preferences - accessibility') -----
+ useCompactTextFields: aBooleanOrNil
+ 
+ 	UseCompactTextFields = aBooleanOrNil ifTrue: [^ self].
+ 	UseCompactTextFields := aBooleanOrNil.
+ 	
+ 	"Discard cached margins for text fields."
+ 	MorphicToolBuilder applyUserInterfaceTheme.
+ 	TheWorldMainDockingBar updateInstances.!

Item was changed:
  ----- Method: PluggableTextMorph class>>textMargins (in category 'defaults') -----
  textMargins
  
+ 	| left other |
+ 	MorphicProject useCompactTextFields
+ 		ifTrue: [
+ 			left := (3 * RealEstateAgent scaleFactor) truncated.
+ 			other := 0]
+ 		ifFalse: [
+ 			left := other := (UserInterfaceTheme current get: #keyboardFocusWidth for: Morph) ifNil: [2].
+ 			other := (other * RealEstateAgent scaleFactor) truncated.
+ 			left >= 3
+ 				ifTrue: [left := other * 2]
+ 				ifFalse: [left := (3 * RealEstateAgent scaleFactor) truncated] ].
+ 	^ left @ other corner: other@ other!
- 	^ (3 * RealEstateAgent scaleFactor) truncated @0 corner: 0 at 0!

Item was changed:
+ (PackageInfo named: 'Morphic') postscript: '"Text fields now make room for #keyboardFocusWidth. Can be disabled via #useCompactTextFields:."
+ UserInterfaceTheme cleanUpAndReset.'!
- (PackageInfo named: 'Morphic') postscript: '"Ensure that open windows do not lose their grips on scale changes..."
- SystemWindow allSubInstancesDo:[:ea | ea wantsGrips: true].'!



More information about the Squeak-dev mailing list