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

commits at source.squeak.org commits at source.squeak.org
Mon Jul 12 15:02:48 UTC 2021


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

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

Name: Morphic-ct.1777
Author: ct
Time: 12 July 2021, 5:02:42.077924 pm
UUID: 7c4d08f6-93cc-464c-aafc-774dec51a942
Ancestors: Morphic-mt.1776

Fixes mouse wheel handling in nested scroll panes. Until now, you cannot scroll the outer pane while hovering the inner pane, even if the inner pane already does not actually react on the wheel event or does not have a scrollable dimension at all. With this patch, the behavior is aligned to many common implementations (i.e., Chromium or Android UI).

Example setup:

	(PluggableTextMorph on: ('Hello\\{1}\\World' withCRs asText format: {
	Character startOfHeader asString asText addAttribute: ((PluggableTextMorph on: 'wonderful\\Squeak' withCRs text: #yourself accept: nil) height: 50; asTextAnchor); yourself
}) text: #yourself accept: nil) height: 50; openInHand.

This would be a helpful improvement for Babylonian where such nested text morphs actually exist.

=============== Diff against Morphic-mt.1776 ===============

Item was changed:
  ----- Method: ScrollPane>>mouseWheel: (in category 'event handling') -----
  mouseWheel: evt
  
+ 	| oldOffset |
+ 	oldOffset := scroller offset.
+ 	
  	evt isWheelUp ifTrue: [scrollBar scrollUp: (evt verticalScrollDelta: self class verticalScrollDeltaPerMouseWheelNotch)].
  	evt isWheelDown ifTrue: [scrollBar scrollDown: (evt verticalScrollDelta: self class verticalScrollDeltaPerMouseWheelNotch)].
  	evt isWheelLeft ifTrue: [hScrollBar scrollUp: (evt horizontalScrollDelta: self class horizontalScrollDeltaPerMouseWheelNotch)].
+ 	evt isWheelRight ifTrue: [hScrollBar scrollDown: (evt horizontalScrollDelta: self class horizontalScrollDeltaPerMouseWheelNotch)].
+ 	
+ 	evt wasHandled: oldOffset ~= scroller offset.!
- 	evt isWheelRight ifTrue: [hScrollBar scrollDown: (evt horizontalScrollDelta: self class horizontalScrollDeltaPerMouseWheelNotch)].!



More information about the Squeak-dev mailing list