[BUG][FIX] PluggableButtonView.1.cs

Andrew C. Greenberg werdna at gate.net
Wed Feb 23 06:19:19 UTC 2000


This changeset comprises what I believe to be a sustainable fix to 
the bug reported over the weekend.  I an abundance of caution, I'd 
appreciate if someone more experienced with this class would take a 
look at this.

To see how the bug is manifest, load up PluggableListView2 (posted 
contemporaneously) without it and select "file..." from the main 
menu.  Then load this changeset and repeat.

'From Squeak2.8alpha of 14 January 2000 [latest update: #1851] on 23 
February 2000 at 12:29:34 am'!
"Change Set:		PluggableButtonView
Date:			23 February 2000
Author:			Andrew C. Greenberg

Fixes a bug that caused labels of PluggableButtonView to be 
improperly centered in some cases.  Previously, PluggableButtonView 
labels were centered as though installed within the window parent 
View, but without a border.
This appeared harmless when the PluggableButtonView is relatively 
centered with respect to the enclosing View and the borderWidth is 
symmetric (as is the case with existing system windows), 
PluggableButtonViews will otherwise display with an out-of-center 
label.

Additionally, this change set replaces a magic number in the previous 
code which catered to leading of the default font with the actual 
leading of the font in which the leading was displayed.  Replaces 
some occurences of 'foo = nil ifTrue:' with 'foo ifNil:'"!
-------------- next part --------------
Skipped content of type multipart/appledouble


More information about the Squeak-dev mailing list