[FIX] StringMorphFontEmp-efc ([sm][et][er] recommended for
inclusion into 3.5alpha by Hannes Hirzel)
Hannes Hirzel
hannes.hirzel.squeaklist at bluewin.ch
Sat Mar 15 13:45:23 UTC 2003
The StringMorph fix only changes two methods but with an important
effect for the user experience (totally 4 lines of code!)
Note: You have the history of the previous emails regarding this fix at
http://swiki.gsug.org:8080/sqfixes/
------------------------------------------------------------------------
-------------------------
Discussion of the changes
------------------------------------------------------------------------
-------------------------
FIRST METHOD CHANGE
old version of method #font:
font: aFont
^ self font: aFont emphasis: 0
new version of method #font:
font: aFont
font _ aFont.
^ self font: font emphasis: emphasis
The first line 'font _ aFont' is not necessary if the second line
would be
self font: aFont emphasis: emphasis
The second line calls a setter funtion for font and emphasis. It keeps
the current emphasis.
HJH: The change of this method is fine.
SECOND METHOD CHANGE
The second method which is changed is analog.
Old method
emphasis: aNumber
self font: (TextStyle defaultFont emphasized: aNumber)
New method
emphasis _ aNumber.
^ self font: font emphasis: emphasis
HJH: The change of this method is fine.
My recommondation: Include in 3.5 alpha.
-- Hannes
More information about the Squeak-dev
mailing list
|