Dear all, in recent versions of Roassal2, multi line labels got wroken. bellow is a patch that fixes the problem trachelShapeForMultiLine: anElement | lines s lbl n txt aColor fontSize | aColor := self colorFor: anElement. fontSize := self heightFor: anElement. txt := self textFor: anElement. txt := txt copyReplaceAll: String tab with: ' '. lines := txt lines. s := TRCompositeShape new. lines reverse do: [ :l | lbl := TRLabelShape new text: l. lbl color: aColor. lbl fontSize: fontSize. s shape1: lbl. s offset1: (lbl width / 2) @ 0. s offset2: 0 @ 20. n := TRCompositeShape new. n shape2: s. s := n ]. ^ s
Of course I meant broken :). The code is for RTLabel. On Sun, Jun 15, 2014 at 3:35 PM, Arturo Zambrano <arturo.zambrano@gmail.com> wrote:
Dear all,
in recent versions of Roassal2, multi line labels got wroken. bellow is a patch that fixes the problem
trachelShapeForMultiLine: anElement | lines s lbl n txt aColor fontSize | aColor := self colorFor: anElement. fontSize := self heightFor: anElement. txt := self textFor: anElement. txt := txt copyReplaceAll: String tab with: ' '. lines := txt lines. s := TRCompositeShape new. lines reverse do: [ :l | lbl := TRLabelShape new text: l. lbl color: aColor. lbl fontSize: fontSize. s shape1: lbl. s offset1: (lbl width / 2) @ 0. s offset2: 0 @ 20. n := TRCompositeShape new. n shape2: s. s := n ]. ^ s
participants (1)
-
Arturo Zambrano