[squeak-dev] The Inbox: Morphic-cao.591.mcz

Chris Muller asqueaker at gmail.com
Thu Dec 22 02:14:54 UTC 2011


Ok, I will integrate this after 4.3 release.  Thanks.

On Fri, Dec 16, 2011 at 4:12 PM,  <commits at source.squeak.org> wrote:
> A new version of Morphic was added to project The Inbox:
> http://source.squeak.org/inbox/Morphic-cao.591.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-cao.591
> Author: cao
> Time: 16 December 2011, 5:12:55.114 pm
> UUID: 7755dc7f-9fa9-4a3d-a7e1-082ca3072df2
> Ancestors: Morphic-cwp.590
>
> move asStringOrText conversion from drawOn: (the caller)
> to display:atRow:on: (the called) to avoid destroying column
> info used by the MulticolumnLazyListMorph.
>
> =============== Diff against Morphic-cwp.590 ===============
>
> Item was changed:
>  ----- Method: LazyListMorph>>display:atRow:on: (in category 'drawing') -----
>  display: item  atRow: row on: canvas
>        "display the given item at row row"
> +       | drawBounds itemAsText |
> +       itemAsText := item asStringOrText.
> -       | drawBounds |
>        drawBounds := self drawBoundsForRow: row.
>        drawBounds := drawBounds intersect: self bounds.
> +       itemAsText isText
> +               ifTrue: [ canvas drawString: itemAsText in: drawBounds
> +                       font: (font emphasized: (itemAsText emphasisAt: 1))
> +                       color: (self colorForRow: row) ]
> +               ifFalse: [ canvas drawString: itemAsText in: drawBounds
> +                       font: font color: (self colorForRow: row) ].!
> -       item isText
> -               ifTrue: [ canvas drawString: item in: drawBounds font: (font emphasized: (item emphasisAt: 1)) color: (self colorForRow: row) ]
> -               ifFalse: [ canvas drawString: item in: drawBounds font: font color: (self colorForRow: row) ].!
>
> Item was changed:
>  ----- Method: LazyListMorph>>drawOn: (in category 'drawing') -----
>  drawOn: aCanvas
>        | |
>        listItems size = 0 ifTrue: [ ^self ].
>
>        self drawSelectionOn: aCanvas.
>
>        (self topVisibleRowForCanvas: aCanvas) to: (self bottomVisibleRowForCanvas: aCanvas) do: [ :row |
>                (listSource itemSelectedAmongMultiple:  row) ifTrue: [
>                        self drawBackgroundForMulti: row on: aCanvas. ].
> +               self display: (self item: row) atRow: row on: aCanvas.
> -               self display: (self item: row) asStringOrText atRow: row on: aCanvas.
>        ].
>
>        listSource potentialDropRow > 0 ifTrue: [
>                self highlightPotentialDropRow: listSource potentialDropRow on: aCanvas ].!
>
>



More information about the Squeak-dev mailing list