[squeak-dev] The Trunk: Morphic-dtl.937.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Apr 26 22:49:34 UTC 2015


David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.937.mcz

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

Name: Morphic-dtl.937
Author: dtl
Time: 26 April 2015, 6:48:24.486 pm
UUID: 010d829c-40df-4561-b124-6f293660b1a2
Ancestors: Morphic-topa.936

Some tools (e.g. FontChooserTool) prefer to display text with no line wrapping. Add #wrapFlag: to PluggableTextMorph and StringHolderView to allow a tool builder to specify the preference in Morphic or MVC.

=============== Diff against Morphic-topa.936 ===============

Item was changed:
  ----- Method: FontChooserTool>>buildWith: (in category 'toolbuilder') -----
  buildWith: builder
  	"Create the ui for the browser"
  	"ToolBuilder open: self"
  	| windowSpec |
  	self offerStyleList ifTrue:[
  		windowSpec := self buildWindowWith: builder specs: {
  			(0 at 0 corner: 0.4 at 0.4) -> [self buildFontListWith: builder].
  			(0.4 at 0 corner: 0.8 at 0.4) -> [self buildStyleListWith: builder].
  			(0.8 at 0 corner: 1.0 at 0.4) -> [self buildPointSizeListWith: builder].
  			(0.0 at 0.4 corner: 1.0 at 0.88) -> [self buildPreviewPaneWith: builder].
  			(0.0 at 0.88 corner: 1 at 1) -> [self buildButtonBarWith: builder].
  		}.
  	] ifFalse:[
  		windowSpec := self buildWindowWith: builder specs: {
  			(0 at 0 corner: 0.7 at 0.4) -> [self buildFontListWith: builder].
  "			(0.4 at 0 corner: 0.8 at 0.4) -> [self buildStyleListWith: builder]."
  			(0.7 at 0 corner: 1.0 at 0.4) -> [self buildPointSizeListWith: builder].
  			(0.0 at 0.4 corner: 1.0 at 0.8) -> [self buildPreviewPaneWith: builder].
  			(0.0 at 0.8 corner: 1 at 1) -> [self buildButtonBarWith: builder].
  		}.
  	].
  	windowSpec extent: self initialExtent.
  	window := builder build: windowSpec.
  	"Yes, that's a hack. But it looks ugly with line breaks."
+ 	(builder widgetAt: #preview) wrapFlag: false.
- 	Smalltalk isMorphic ifTrue:[(builder widgetAt: #preview) textMorph wrapFlag: false].
  	(builder widgetAt: #fontList) scrollSelectionIntoView.
  	^window!

Item was added:
+ ----- Method: PluggableTextMorph>>isWrapped (in category 'model access') -----
+ isWrapped
+ 
+ 	^ textMorph isWrapped!

Item was added:
+ ----- Method: PluggableTextMorph>>wrapFlag: (in category 'model access') -----
+ wrapFlag: aBoolean
+ 
+ 	textMorph wrapFlag: aBoolean!



More information about the Squeak-dev mailing list