Skip to content

Commit b2c1704

Browse files
committed
fixes ToCircularContextMenu>>isOutsideEvent: to make clickAction working on menu items
1 parent a87d6cd commit b2c1704

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/Toplo-Widget-Circular/ToCircularContextMenu.class.st

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@ ToCircularContextMenu >> initialize [
5151
self fitContent
5252
]
5353

54+
{ #category : #testing }
55+
ToCircularContextMenu >> isOutsideEvent: anEvent [
56+
57+
| windows |
58+
windows := Array streamContents: [ :stream |
59+
self manager currentWindowDo: [ :w |
60+
w allSubwindowsDo: [ :sub | stream nextPut: sub ] ] ].
61+
(windows allSatisfy: [ :w | w isOutsideEvent: anEvent ]) ifFalse: [
62+
^ false ].
63+
(self items allSatisfy: [ :it | it isOutsideEvent: anEvent ])
64+
ifFalse: [ ^ false ].
65+
^ super isOutsideEvent: anEvent
66+
]
67+
5468
{ #category : #'t - menu window model' }
5569
ToCircularContextMenu >> isTopMenu [
5670

@@ -93,20 +107,6 @@ ToCircularContextMenu >> newRawSkin [
93107
^ ToCircularMenuWindowSkin new
94108
]
95109

96-
{ #category : #layout }
97-
ToCircularContextMenu >> onLayout: aBounds context: aBlElementBoundsUpdateContext [
98-
99-
super onLayout: aBounds context: aBlElementBoundsUpdateContext.
100-
self checkLayoutStepOnLayout: aBounds context: aBlElementBoundsUpdateContext
101-
]
102-
103-
{ #category : #layout }
104-
ToCircularContextMenu >> onMeasure: anExtentMeasurementSpec [
105-
106-
self measureWithExtentMeasurementSpec: anExtentMeasurementSpec onEvent: self lastPopupEvent.
107-
super onMeasure: anExtentMeasurementSpec
108-
]
109-
110110
{ #category : #'t - annulus sector layout user' }
111111
ToCircularContextMenu >> stateHolder [
112112

0 commit comments

Comments
 (0)