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

commits at source.squeak.org commits at source.squeak.org
Thu Feb 10 15:51:12 UTC 2022


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

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

Name: Morphic-mt.1888
Author: mt
Time: 10 February 2022, 4:51:06.860843 pm
UUID: fa77d448-7885-a943-aada-a35604dd518a
Ancestors: Morphic-mt.1887

Ha! We can just use a centered text style. No need to configure a piece of text with specific attributes. :-)

=============== Diff against Morphic-mt.1887 ===============

Item was changed:
  ----- Method: FontChooserTool>>buildPointSizeInputWith: (in category 'toolbuilder') -----
  buildPointSizeInputWith: builder
  	"Build the font choosers list of point sizes"
  	| listSpec |
  	listSpec := builder pluggableInputFieldSpec new.
  	listSpec 
  		model: self;
  		plainTextOnly: true;
+ 		getText: #pointSizeInput;
- 		getText: #pointSizeInput; 
  		setText: #pointSizeInput:;
+ 		textStyle: TextStyle default copy centered;
  		softLineWrap: true.
  	^listSpec
  !

Item was changed:
  ----- Method: FontChooserTool>>buildWith: (in category 'toolbuilder') -----
  buildWith: builder
  	"Create the ui for the browser"
  	"ToolBuilder open: self"
  	| windowSpec hDiv |
  	hDiv := 0.55.
  	self offerStyleList ifTrue:[
  		windowSpec := self buildWindowWith: builder specs: {
  			(0 at 0 corner: 0.5 at hDiv) -> [self buildFontListWith: builder].
  			(0.5 at 0 corner: 0.8 at hDiv) -> [self buildStyleListWith: builder].
  			(LayoutFrame fractions: (0.8 at 0 corner: 1.0 at hDiv) offsets: (0 at 0 corner: 0 @ self pointSizeInputHeight negated))
  				-> [self buildPointSizeListWith: builder].
  			(LayoutFrame fractions: (0.8 at hDiv corner: 1.0 at hDiv) offsets: (0 at self pointSizeInputHeight negated corner: 0 at 0))
  				-> [self buildPointSizeInputWith: builder].
  			(LayoutFrame fractions: (0.0 at hDiv corner: 1.0 at 1.0) offsets: (0 at 0 corner: 0 @ self buttonHeight negated))
  				-> [self buildPreviewPaneWith: builder].
  			(LayoutFrame fractions: (0 at 1 corner: 1 at 1) offsets: (0@ self buttonHeight negated corner: 0 at 0))
  				-> [self buildButtonBarWith: builder].
  		}.
  	] ifFalse:[
  		windowSpec := self buildWindowWith: builder specs: {
  			(0 at 0 corner: 0.7 at hDiv) -> [self buildFontListWith: builder].
  			(LayoutFrame fractions: (0.7 at 0 corner: 1.0 at hDiv) offsets: (0 at 0 corner: 0 @ self pointSizeInputHeight negated))
  				-> [self buildPointSizeListWith: builder].
  
  			(LayoutFrame fractions: (0.7 at hDiv corner: 1.0 at hDiv) offsets: (0 at self pointSizeInputHeight negated corner: 0 at 0))
  				-> [self buildPointSizeInputWith: builder].
  			(LayoutFrame fractions: (0.0 at hDiv corner: 1.0 at 1.0) offsets: (0 at 0 corner: 0 @ self buttonHeight negated))
  				-> [self buildPreviewPaneWith: builder].
  			(LayoutFrame fractions: (0 at 1 corner: 1 at 1) offsets: (0@ self buttonHeight negated corner: 0 at 0))
  				-> [self buildButtonBarWith: builder].
  		}.
  	].
  	windowSpec extent: self initialExtent.
  	window := builder build: windowSpec.
  
  	"Now that the window has been built, notify selection again to scroll it into view."
  	self changed: #selectedFontIndex.
  	self changed: #selectedFontStyleIndex.
  	self changed: #selectedPointSizeIndex.
- 	self changed: #textStyle with: self selectedFontTextStyle.
  	^window!

Item was changed:
  ----- Method: FontChooserTool>>pointSizeInput (in category 'point size') -----
  pointSizeInput
  
+ 	^ self pointSize asString!
- 	^ self pointSize asString asText
- 		addAttribute: TextAlignment centered;
- 		yourself!



More information about the Squeak-dev mailing list