Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1183.mcz ==================== Summary ==================== Name: Morphic-mt.1183 Author: mt Time: 21 June 2016, 2:05:38.378974 pm UUID: 56a07e0a-08c1-6d4b-8275-9c6a2affdba7 Ancestors: Morphic-mt.1182 Fixes regression in docking bar. A simple click now keeps the menu open again. =============== Diff against Morphic-mt.1182 =============== Item was changed: ----- Method: DockingBarItemMorph>>mouseDown: (in category 'events') ----- mouseDown: evt "Handle a mouse down event. Menu items get activated when the mouse is over them." (evt shiftPressed and:[self wantsKeyboardFocusOnShiftClick]) ifTrue: [ ^super mouseDown: evt ]. "enable label editing" isSelected ifTrue: [ - evt hand newMouseFocus: nil. owner selectItem: nil event: evt. ] ifFalse: [ - (self containsPoint: evt position) ifFalse: [ self halt ]. owner activate: evt. "Redirect to menu for valid transitions" owner selectItem: self event: evt. ] ! Item was changed: ----- Method: DockingBarItemMorph>>mouseUp: (in category 'events') ----- mouseUp: evt "Handle a mouse up event. Menu items get activated when the mouse is over them. Do nothing if we're not in a 'valid menu transition', meaning that the current hand focus must be aimed at the owning menu." evt hand mouseFocus == owner ifFalse: [ ^self ]. self contentString ifNotNil: [ self contents: self contentString withMarkers: true inverse: true. self refreshWorld. + (Delay forMilliseconds: 200) wait ].! - (Delay forMilliseconds: 200) wait ]. - owner rootMenu selectItem: nil event: evt. - self invokeWithEvent: evt! Item was added: + ----- Method: DockingBarMorph>>indicateKeyboardFocus (in category 'testing') ----- + indicateKeyboardFocus + ^ false! Item was changed: ----- Method: DockingBarMorph>>mouseDown: (in category 'events-processing') ----- mouseDown: evt (self fullContainsPoint: evt position) ifFalse: [ self selectItem: nil event: evt. + self deleteIfPopUp: evt ]! - evt hand releaseMouseFocus: self ]! Item was added: + ----- Method: DockingBarMorph>>mouseUp: (in category 'events-processing') ----- + mouseUp: evt + + evt hand newMouseFocus: self.! 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 that the current selected item wants to release its selection. " + "Note: The following does not traverse upwards but it's the best I can do for now" + popUpOwner ifNotNil:[(popUpOwner activateOwnerMenu: evt) ifTrue: [^ self]]. + self selectedItem ifNil: [ ^ self ]. (self selectedItem containsPoint: evt position) ifTrue: [ ^ self ]. self 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." selectedItem ifNotNil: [ (selectedItem activateSubmenu: evt) ifTrue: [ ^self ] ifFalse: [ (self containsPoint: evt position) ifFalse: [ + self selectItem: nil event: evt ] ] ].! - 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]! Item was changed: ----- Method: MenuMorph>>mouseUp: (in category 'events') ----- mouseUp: evt "Handle a mouse up event. Note: This might be sent from a modal shell." (self fullContainsPoint: evt position) ifFalse:[ + ^ self deleteIfPopUp: evt]. - "Mouse up outside. Release eventual focus and delete if pop up." - evt hand releaseMouseFocus: self. - ^self deleteIfPopUp: evt]. stayUp ifFalse:[ "Still in pop-up transition; keep focus" evt hand newMouseFocus: self].! |
Free forum by Nabble | Edit this page |