[squeak-dev] The Inbox: Morphic-laza.576.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Sep 19 13:48:50 UTC 2011
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-laza.576.mcz
==================== Summary ====================
Name: Morphic-laza.576
Author: laza
Time: 19 September 2011, 3:48:05.75 pm
UUID: 57b8c514-c187-4a95-8628-aa874edab248
Ancestors: Morphic-nice.572
Another bit right from the Rocket Science Lab.
Center preselected button of UserDialogBoxMorph right under the mouse cursor. No more hunting tiny Yes buttons (that's right Nancy).
=============== Diff against Morphic-nice.572 ===============
Item was changed:
----- Method: UserDialogBoxMorph>>runModalIn:forHand:at: (in category 'running') -----
runModalIn: aWorld forHand: aHand at: aPointOrNil
"Ensure that we have a reasonable minimum size"
+ | oldFocus pos offset |
- | oldFocus pos |
(ProvideAnswerNotification signal: self label asString) ifNotNil:[:answer| ^answer].
self openInWorld: aWorld.
+ pos := aPointOrNil ifNil: [aHand position].
+ offset := aPointOrNil
+ ifNil: [selectedButton fullBounds origin - (selectedButton fullBounds extent // 2 * (-1 at 1))]
+ ifNotNil: [self fullBounds extent // 2].
+ self setConstrainedPosition: pos - offset hangOut: false.
- pos := (aPointOrNil ifNil:[aHand position]) - (self fullBounds extent // 2).
- self setConstrainedPosition: pos hangOut: false.
oldFocus := aHand keyboardFocus.
aHand newMouseFocus: self.
aHand newKeyboardFocus: self.
[self isInWorld] whileTrue:[aWorld doOneSubCycle].
oldFocus ifNotNil:[aHand keyboardFocus: oldFocus].
^value!
More information about the Squeak-dev
mailing list
|