[squeak-dev] The Inbox: MorphicExtras-tcj.256.mcz
Tim Johnson
digit at sonic.net
Fri Jun 7 22:13:49 UTC 2019
Hi,
I found this after enabling debug code* in TextMorph>>#drawOn:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2019-06-07 at 2.38.23 PM.png
Type: image/png
Size: 23797 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190607/24ad00f5/attachment.png>
-------------- next part --------------
My fix is to wrap the text, thus creating this:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2019-06-07 at 2.38.41 PM.png
Type: image/png
Size: 13478 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190607/24ad00f5/attachment-0001.png>
-------------- next part --------------
However, the MorphicExtras package may need the following added to its
postscript for the change to take effect:
FlapTab allSubInstancesDo: [:ft | ft reformatTextualTab]
Thanks,
Tim J.
* by changing "false ifTrue: [...]" to "true ifTrue: [...]"
On Jun 7, 2019, at 3:02 PM, commits at source.squeak.org wrote:
> A new version of MorphicExtras was added to project The Inbox:
> http://source.squeak.org/inbox/MorphicExtras-tcj.256.mcz
>
> ==================== Summary ====================
>
> Name: MorphicExtras-tcj.256
> Author: tcj
> Time: 7 June 2019, 3:03:00.368787 pm
> UUID: 14a1c7c2-1e36-4ce1-b27f-b046f640921e
> Ancestors: MorphicExtras-kfr.255
>
> Tell TextMorphs in Flaps to wrap at parent boundary, rather than
> extend across the whole display (as exposed by enabling debug code
> in TextMorph>>drawOn: ). Must execute the following (as postscript
> of MorphicExtras package, perhaps) to give life to the change:
>
> FlapTab allSubInstancesDo: [:ft | ft reformatTextualTab]
>
> =============== Diff against MorphicExtras-kfr.255 ===============
>
> Item was changed:
> ----- Method: FlapTab>>assumeString:font:orientation:color: (in
> category 'textual tabs') -----
> assumeString: aString font: aFont orientation: orientationSymbol
> color: aColor
> | aTextMorph workString tabStyle |
> labelString := aString asString.
> workString := orientationSymbol == #vertical
> ifTrue:
> [String streamContents:
> [:s |
> labelString do: [:c | s nextPut: c] separatedBy: [s nextPut:
> Character cr]]]
> ifFalse: [labelString].
> tabStyle := (TextStyle new)
> leading: 0;
> newFontArray: (Array with: aFont).
> aTextMorph := (TextMorph new setTextStyle: tabStyle)
> contents: (workString asText addAttribute: (TextKern kern: 3)).
> + aTextMorph wrapFlag: true.
> self removeAllMorphs.
> self borderStyle: (BorderStyle raised width: 2).
> aColor ifNotNil: [self color: aColor].
> self addMorph: aTextMorph centered.
> aTextMorph lock
> "
> FlapTab allSubInstancesDo: [:ft | ft reformatTextualTab]
> "!
>
>
>
More information about the Squeak-dev
mailing list
|