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

Marcel Taeumel marcel.taeumel at hpi.de
Mon Jan 24 07:51:24 UTC 2022


Hi Christoph --

I applied the one-liner I proposed. Treated Morphic-ct.1855. If you see more issues in this area, please report back.

Note that Morphic event dispatch for overlapping siblings is still not supported and relies on top-most participants/morphs to either implement #rejectsEvent: or occluded morphs to exploit keyboard/mouse focus. The latter I would not recommend.

Best,
Marcel
Am 23.01.2022 08:47:06 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
Hi Christoph --

-1

For, I would just use this:

delta := self innerBounds amountToTranslateWithin: sourceItem world visibleClearArea.


Best,
Marcel
Am 22.01.2022 17:53:56 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.1855.mcz

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

Name: Morphic-ct.1855
Author: ct
Time: 22 January 2022, 5:53:35.957739 pm
UUID: a884bbaa-fd98-8346-8712-0f4339f60d6e
Ancestors: Morphic-mt.1854

Fixes occlusion of docking bar menus by the docking bar when the menu is taller than the world. As the docking bar is displayed in front of its menus, the first menu's item would not be visible otherwise.

Note that in the long term, we might want to add a scroll bar to menus that do not fit into the screen.

=============== Diff against Morphic-mt.1854 ===============

Item was added:
+ ----- Method: DockingBarItemMorph>>clearAreaForSubmenus (in category 'accessing') -----
+ clearAreaForSubmenus
+ "The receiver is displayed behind any docking bars (which have a smaller morphic layer number) and thus must not cross them."
+
+ ^ self world clearArea!

Item was added:
+ ----- Method: MenuItemMorph>>clearAreaForSubmenus (in category 'accessing') -----
+ clearAreaForSubmenus
+
+ ^ self worldBounds!

Item was changed:
----- Method: MenuMorph>>popUpAdjacentTo:forHand:from: (in category 'control') -----
popUpAdjacentTo: rightOrLeftPoint forHand: hand from: sourceItem
"Present this menu at the given point under control of the given hand."

| tryToPlace selectedOffset rightPoint leftPoint |
hand world startSteppingSubmorphsOf: self.
popUpOwner := sourceItem.

self fullBounds.
self updateColor.

"ensure layout is current"
selectedOffset := (selectedItem
ifNil: [self items first]) position - self position.
tryToPlace := [:where :mustFit | | delta |
self position: where - selectedOffset.
+ delta := (self boundsInWorld insetBy: self layoutInset) amountToTranslateWithin: sourceItem clearAreaForSubmenus.
- delta := self boundsInWorld amountToTranslateWithin: sourceItem worldBounds.
(delta x = 0
or: [mustFit])
ifTrue: [delta = (0 @ 0)
ifFalse: [self position: self position + delta].
sourceItem world addMorphFront: self.
^ self]].
rightPoint := rightOrLeftPoint first + ((self layoutInset + self borderWidth) @ 0).
leftPoint := rightOrLeftPoint last + ((self layoutInset + self borderWidth - self width) @ 0).
tryToPlace
value: rightPoint value: false;
value: leftPoint value: false;
value: rightPoint value: true.!


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


More information about the Squeak-dev mailing list