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

Taeumel, Marcel Marcel.Taeumel at hpi.de
Fri Jun 17 08:16:51 UTC 2022


I think we wanted to avoid instVar shadowing ... Maybe use "anOwner"?
________________________________
From: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> on behalf of commits at source.squeak.org <commits at source.squeak.org>
Sent: Thursday, June 16, 2022 6:46:23 PM
To: squeak-dev at lists.squeakfoundation.org <squeak-dev at lists.squeakfoundation.org>
Subject: [squeak-dev] The Inbox: Morphic-ct.2010.mcz

A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.2010.mcz

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

Name: Morphic-ct.2010
Author: ct
Time: 16 June 2022, 6:46:17.941852 pm
UUID: 7427f838-4f8f-7b49-99f5-d08cd9eeac53
Ancestors: Morphic-mt.2007

Proposal to fix z-order of docking bar menus when etoys mode is activated.

=============== Diff against Morphic-mt.2007 ===============

Item was added:
+ ----- Method: DockingBarMenuMorph>>popUpAdjacentTo:forHand:from: (in category 'as yet unclassified') -----
+ popUpAdjacentTo: rightOrLeftPoint forHand: hand from: sourceItem
+
+        | ownerInWorld world |
+        super popUpAdjacentTo: rightOrLeftPoint forHand: hand from: sourceItem.
+
+        "Docking bar and protruding menu should appear visually merged. Move the source item behind the receiver. If we did it the other way around, other navigators and docking bars in front of the sourceItem would cover the receiver. For the same reason, we can't use a higher different morphic layer numbers for docking bar menus because this would hide them after all other navigators."
+        world := owner world.
+        ownerInWorld := sourceItem firstOwnerSuchThat: [:owner | owner owner == world].
+        world addMorph: ownerInWorld inFrontOf: self.!

Item was changed:
  ----- Method: DockingBarMorph>>add:icon:help:subMenu: (in category 'construction') -----
  add: wordingString icon: aForm help: helpString subMenu: aMenuMorph
         "Append the given submenu with the given label."
         | item |
         item := DockingBarItemMorph new.
         item contents: wordingString.
         item subMenu: aMenuMorph.
         item icon: aForm.
         helpString isNil
                 ifFalse: [item setBalloonText: helpString].
         aMenuMorph ifNotNil: [
+                "Docking bar and protruding menu should appear visually merged."
+                aMenuMorph morphicLayerNumber: self morphicLayerNumber].
-                aMenuMorph morphicLayerNumber: self morphicLayerNumber + 1].
         self addMorphBack: item!

Item was changed:
  ----- Method: DockingBarMorph>>add:icon:selectedIcon:help:subMenu: (in category 'construction') -----
  add: wordingString icon: aForm selectedIcon: anotherForm help: helpString subMenu: aMenuMorph
         "Append the given submenu with the given label."
         | item |
         item := DockingBarItemMorph new
                 contents: wordingString;
                 subMenu: aMenuMorph;
                 icon: aForm;
                 selectedIcon: anotherForm.
         helpString ifNotNil: [
                 item setBalloonText: helpString ].
         aMenuMorph ifNotNil: [
+                "Docking bar and protruding menu should appear visually merged."
+                aMenuMorph morphicLayerNumber: self morphicLayerNumber].
-                aMenuMorph morphicLayerNumber: self morphicLayerNumber + 1 ].
         self addMorphBack: item!

Item was changed:
  ----- Method: DockingBarMorph>>addItem: (in category 'construction') -----
  addItem: aBlock
         | item |
         item := DockingBarItemMorph new.
         aBlock value: item.
         item subMenu ifNotNil: [:menu |
                 "Docking bar and protruding menu should appear visually merged."
+                menu morphicLayerNumber: self morphicLayerNumber].
-                menu morphicLayerNumber: self morphicLayerNumber + 1].
         self addMorphBack: item!

Item was changed:
  ----- Method: DockingBarMorph>>addUpdatingItem: (in category 'construction') -----
  addUpdatingItem: aBlock
         | item |
         item := DockingBarUpdatingItemMorph new.
         aBlock value: item.
         item subMenu ifNotNil: [:menu |
                 "Docking bar and protruding menu should appear visually merged."
+                menu morphicLayerNumber: self morphicLayerNumber].
-                menu morphicLayerNumber: self morphicLayerNumber + 1].
         self addMorphBack: item!


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


More information about the Squeak-dev mailing list