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

commits at source.squeak.org commits at source.squeak.org
Fri Apr 24 16:40:19 UTC 2020


Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1650.mcz

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

Name: Morphic-ct.1650
Author: ct
Time: 24 April 2020, 6:40:10.333958 pm
UUID: 953da2d7-9644-a446-80c7-ceee0a5ec70f
Ancestors: Morphic-mt.1649

Proposal: Fix a small glitch in menu selection logic. In a labeled menu, you can hover the first item and then hover the title/close button, but the selection will be only reset when the whole menu is unhovered. This is confusing because pressing the mouse button does not actually trigger the menu item.

=============== Diff against Morphic-mt.1649 ===============

Item was changed:
  ----- Method: MenuMorph>>mouseMove: (in category 'events') -----
  mouseMove: evt
+ 	"If the mouse moves over an item not selected, we try to set it as selected. If this happens depends on whether the current selected item wants to release its selection."
- 	" If the mouse moves over an item not selected, we try to set it as selected.
- 	If this happens depends on that the current selected item wants to release
- 	its selection. "
  
  	self selectedItem ifNil: [
  		self 
+ 			selectItem: (self items 
+ 				detect: [:each | each containsPoint: evt position]
+ 				ifNone: [nil])
- 			selectItem: (
- 				self items 
- 					detect: [ :each | each containsPoint: evt position ] 
- 					ifNone: [ nil ])
  			event: evt].
+ 	
+ 	"Transfer control to *either* the currently active submenu or the pop up owner, if any. Since the active sub menu is always displayed upfront check it first."
+ 	self selectedItem ifNotNil: [:item |
+ 		(item activateSubmenu: evt) 
+ 			ifTrue: [^ self].
+ 		(item containsPoint: evt position)
+ 			ifFalse: [self selectItem: nil event: evt]].
+ 	
- 
- 	"Transfer control to *either* the currently active submenu or the pop up owner, if any. Since the active sub menu is always displayed upfront check it first."	
- 	self selectedItem ifNotNil: [
- 		(self selectedItem activateSubmenu: evt) 
- 			ifTrue: [ ^self ]
- 			ifFalse: [ 
- 				(self containsPoint: evt position) ifFalse: [ 
- 					self selectItem: nil event: evt ] ] ].
- 
  	"Note: The following does not traverse upwards but it's the best I can do for now"
+ 	popUpOwner ifNotNil: [popUpOwner activateOwnerMenu: evt].!
- 	popUpOwner ifNotNil:[(popUpOwner activateOwnerMenu: evt) ifTrue: [^ self]].
- !



More information about the Squeak-dev mailing list