[squeak-dev] The Inbox: Morphic-ct.2032.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Wed Aug 24 12:02:45 UTC 2022


Not "all morphs" ... maybe just the ones that are children of the world. Then again, there are users that get frustrated when things move around just because some screen resizing hick-up had some intermediate smaller size ...

Best,
Marcel
Am 24.08.2022 14:00:59 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:
Interesting idea! Should we generally make all morphs visible, not just a subset of them? I was already confused a few times when a parts bin or a do-it button was no longer accessible after resizing the window ...

Best,
Christoph
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Mittwoch, 24. August 2022 13:35:57
An: squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.2032.mcz
 
Can we avoid #respondsTo: by just implementing #makeMeVisible in Morph?

Best,
Marcel
Am 24.08.2022 12:16:17 schrieb commits at source.squeak.org <commits at source.squeak.org>:
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.2032.mcz

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

Name: Morphic-ct.2032
Author: ct
Time: 24 August 2022, 12:15:59.039424 pm
UUID: 385fbab8-ecc3-9f42-8b04-5ce73768f082
Ancestors: Morphic-ct.2031

Proposal: After resizing the display, also make all open dialog windows and progress morphs visible.

=============== Diff against Morphic-ct.2031 ===============

Item was added:
+ ----- Method: DialogWindow>>makeMeVisible (in category 'updating') -----
+ makeMeVisible
+ "Assure that the receiver is visible within the current world bounds."
+
+ self world extent > (0 @ 0) ifFalse: [^ self].
+
+ ((self world bounds insetBy: (0 @ 0 corner: self firstSubmorph height asPoint))
+ containsPoint: self position) ifTrue: [^ self "OK -- at least my top left is visible"].
+
+ "window not on screen (probably due to reframe) -- move it now"
+ self position: (RealEstateAgent initialFrameFor: self initialExtent: self extent world: self world) topLeft.!

Item was changed:
----- Method: PasteUpMorph>>fullRepaintNeeded (in category 'world state') -----
fullRepaintNeeded

worldState doFullRepaint.
+ self submorphsDo: [:morph |
+ (morph respondsTo: #makeMeVisible)
+ ifTrue: [morph makeMeVisible]].
+ SystemProgressMorph fullRepaintNeeded.!
- SystemWindow windowsIn: self
- satisfying: [:w | w makeMeVisible. false].
-
- !

Item was added:
+ ----- Method: SystemProgressMorph class>>fullRepaintNeeded (in category 'class initialization') -----
+ fullRepaintNeeded
+
+ UniqueInstance ifNotNil: [UniqueInstance recenter].!

Item was changed:
+ ----- Method: SystemWindow>>makeMeVisible (in category 'updating') -----
+ makeMeVisible
+ "Assure that the receiver is visible within the current world bounds."
- ----- Method: SystemWindow>>makeMeVisible (in category 'drawing') -----
- makeMeVisible

+ self world extent > (0 @ 0) ifFalse: [^ self].
- self world extent > (0 at 0) ifFalse: [^ self].

+ ((self world bounds insetBy: (0 @ 0 corner: self labelHeight asPoint))
- ((self world bounds insetBy: (0 at 0 corner: self labelHeight asPoint))
containsPoint: self position) ifTrue: [^ self "OK -- at least my top left is visible"].

"window not on screen (probably due to reframe) -- move it now"
+ self position: (self isCollapsed
+ ifTrue: [RealEstateAgent assignCollapsePointFor: self]
+ ifFalse: [(RealEstateAgent initialFrameFor: self initialExtent: self extent world: self world) topLeft]).!
- self isCollapsed
- ifTrue: [self position: (RealEstateAgent assignCollapsePointFor: self)]
- ifFalse: [self position: (RealEstateAgent initialFrameFor: self initialExtent: self extent world: self world) topLeft].
-
- !


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220824/0b62e9de/attachment.html>


More information about the Squeak-dev mailing list