equal
deleted
inserted
replaced
163 |
163 |
164 lineIndex := (pointInLabel y // self font height) + 1. |
164 lineIndex := (pointInLabel y // self font height) + 1. |
165 line := logo at:lineIndex ifAbsent:nil. |
165 line := logo at:lineIndex ifAbsent:nil. |
166 line notNil ifTrue:[ |
166 line notNil ifTrue:[ |
167 pointInLine := pointInLabel - (0 @ ((lineIndex - 1) * self font height)). |
167 pointInLine := pointInLabel - (0 @ ((lineIndex - 1) * self font height)). |
168 emphasis := line emphasisAtPoint:pointInLine on:self. |
168 emphasis := line emphasisAtX:pointInLine x on:self. |
169 ]. |
169 ]. |
170 ] ifFalse:[ |
170 ] ifFalse:[ |
171 emphasis := logo emphasisAtPoint:pointInLabel on:self. |
171 emphasis := logo emphasisAtX:pointInLabel x on:self. |
172 ]. |
172 ]. |
173 (emphasisAction := Text actionBlockFromEmphasis:emphasis) notNil ifTrue:[ |
173 emphasis notNil ifTrue:[ |
174 ^ emphasisAction |
174 (emphasisAction := Text actionBlockFromEmphasis:emphasis) notNil ifTrue:[ |
|
175 ^ emphasisAction |
|
176 ]. |
175 ]. |
177 ]. |
176 ]. |
178 ]. |
177 ^ pressAction. |
179 ^ pressAction. |
178 ]. |
180 ]. |
179 |
181 |
253 actionEmphasisIn:aText atPoint:aPoint |
255 actionEmphasisIn:aText atPoint:aPoint |
254 "check for an actionBlock-emphasis in aText at aPoint. |
256 "check for an actionBlock-emphasis in aText at aPoint. |
255 Answer an Array with the whole emphasis and the actionBlock, |
257 Answer an Array with the whole emphasis and the actionBlock, |
256 or nil" |
258 or nil" |
257 |
259 |
258 |emphasis action| |
260 |emphasis emphasisAction| |
259 |
261 |
260 emphasis := aText emphasisAtPoint:aPoint on:self. |
262 emphasis := aText emphasisAtX:aPoint x on:self. |
261 emphasis notNil ifTrue:[ |
263 emphasis notNil ifTrue:[ |
262 action := Text actionBlockFromEmphasis:emphasis. |
264 emphasisAction := Text actionBlockFromEmphasis:emphasis. |
263 action notNil ifTrue:[ |
265 emphasisAction notNil ifTrue:[ |
264 ^ { emphasis . action } |
266 ^ { emphasis . emphasisAction } |
265 ]. |
267 ]. |
266 ]. |
268 ]. |
267 ^ #(nil nil). |
269 ^ #(nil nil). |
268 |
270 |
269 "Modified: / 13-09-2017 / 18:14:58 / mawalch" |
271 "Modified: / 13-09-2017 / 18:14:58 / mawalch" |