The Trunk: ST80-mt.211.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: ST80-mt.211.mcz

commits-2
Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.211.mcz

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

Name: ST80-mt.211
Author: mt
Time: 9 May 2016, 4:38:16.550999 pm
UUID: 34bab149-f6f2-194f-b1ba-5695b06e143b
Ancestors: ST80-mt.210

Fixes font rendering in pop-up menus. Also removes the hack that forced black text on white background. Now, the example at the end of the method works again.

Note that the crappy font rendering was due to an issue with bitmapped fonts at the moment. We cannot check whether a StrikeFont has nice AA in its glyphs.

=============== Diff against ST80-mt.210 ===============

Item was changed:
  ----- Method: Paragraph>>asForm (in category 'converting') -----
  asForm
  "Answer a Form made up of the bits that represent the receiver's displayable text."
+
+ | theForm |
+ theForm := (Form extent: compositionRectangle extent depth: Display depth)
- | theForm oldBackColor oldForeColor |
- textStyle isTTCStyle ifTrue: [
- theForm :=  (Form extent: compositionRectangle extent depth: 32)
  offset: offset.
+
- ] ifFalse: [
- theForm := (ColorForm extent: compositionRectangle extent)
- offset: offset;
- colors: (Array
- with: (backColor == nil ifTrue: [Color transparent] ifFalse: [backColor])
- with: (foreColor == nil ifTrue: [Color black] ifFalse: [foreColor])).
- ].
- oldBackColor := backColor.
- oldForeColor := foreColor.
- backColor := Color white.
- foreColor := Color black.
  self displayOn: theForm
  at: 0@0
  clippingBox: theForm boundingBox
  rule: Form over
  fillColor: nil.
+
- backColor := oldBackColor.
- foreColor := oldForeColor.
  ^ theForm
 
  "Example:
  | p |
  p := 'Abc' asParagraph.
  p foregroundColor: Color red backgroundColor: Color black.
  p asForm displayOn: Display at: 30@30 rule: Form over"
  !


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: ST80-mt.211.mcz

Hannes Hirzel
Thank you, Marcel,  for this great fix for MVC projects. The UI look
is neat again. Helpful to work on Morphic while using a MVC project.

--Hannes

On Mon, 9 May 2016 14:38:17.523 0000, [hidden email]
<[hidden email]> wrote:

> Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
> http://source.squeak.org/trunk/ST80-mt.211.mcz
>
> ==================== Summary ====================
>
> Name: ST80-mt.211
> Author: mt
> Time: 9 May 2016, 4:38:16.550999 pm
> UUID: 34bab149-f6f2-194f-b1ba-5695b06e143b
> Ancestors: ST80-mt.210
>
> Fixes font rendering in pop-up menus. Also removes the hack that forced
> black text on white background. Now, the example at the end of the method
> works again.
>
> Note that the crappy font rendering was due to an issue with bitmapped fonts
> at the moment. We cannot check whether a StrikeFont has nice AA in its
> glyphs.
>
> =============== Diff against ST80-mt.210 ===============
>
> Item was changed:
>   ----- Method: Paragraph>>asForm (in category 'converting') -----
>   asForm
>   "Answer a Form made up of the bits that represent the receiver's
> displayable text."
> +
> + | theForm |
> + theForm := (Form extent: compositionRectangle extent depth: Display
> depth)
> - | theForm oldBackColor oldForeColor |
> - textStyle isTTCStyle ifTrue: [
> - theForm :=  (Form extent: compositionRectangle extent depth: 32)
>   offset: offset.
> +
> - ] ifFalse: [
> - theForm := (ColorForm extent: compositionRectangle extent)
> - offset: offset;
> - colors: (Array
> - with: (backColor == nil ifTrue: [Color transparent] ifFalse:
> [backColor])
> - with: (foreColor == nil ifTrue: [Color black] ifFalse: [foreColor])).
> - ].
> - oldBackColor := backColor.
> - oldForeColor := foreColor.
> - backColor := Color white.
> - foreColor := Color black.
>   self displayOn: theForm
>   at: 0@0
>   clippingBox: theForm boundingBox
>   rule: Form over
>   fillColor: nil.
> +
> - backColor := oldBackColor.
> - foreColor := oldForeColor.
>   ^ theForm
>
>   "Example:
>   | p |
>   p := 'Abc' asParagraph.
>   p foregroundColor: Color red backgroundColor: Color black.
>   p asForm displayOn: Display at: 30@30 rule: Form over"
>   !
>
>
>