LinkButton.st
changeset 6216 9c9487e63400
parent 6215 4480fe34e420
--- a/LinkButton.st	Thu Jan 30 10:02:49 2020 +0100
+++ b/LinkButton.st	Thu Jan 30 12:50:29 2020 +0100
@@ -165,13 +165,15 @@
                 line := logo at:lineIndex ifAbsent:nil.
                 line notNil ifTrue:[
                     pointInLine := pointInLabel - (0 @ ((lineIndex - 1) * self font height)).
-                    emphasis := line emphasisAtPoint:pointInLine on:self. 
+                    emphasis := line emphasisAtX:pointInLine x on:self. 
                 ].    
             ] ifFalse:[    
-                emphasis := logo emphasisAtPoint:pointInLabel on:self. 
+                emphasis := logo emphasisAtX:pointInLabel x on:self. 
             ].
-            (emphasisAction := Text actionBlockFromEmphasis:emphasis) notNil ifTrue:[
-                ^ emphasisAction
+            emphasis notNil ifTrue:[
+                (emphasisAction := Text actionBlockFromEmphasis:emphasis) notNil ifTrue:[
+                    ^ emphasisAction
+                ].    
             ].    
         ].    
         ^ pressAction.
@@ -255,13 +257,13 @@
      Answer an Array with the whole emphasis and the actionBlock,
      or nil"
 
-    |emphasis action|
+    |emphasis emphasisAction|
 
-    emphasis := aText emphasisAtPoint:aPoint on:self.
+    emphasis := aText emphasisAtX:aPoint x on:self.
     emphasis notNil ifTrue:[
-        action := Text actionBlockFromEmphasis:emphasis.
-        action notNil ifTrue:[
-            ^ { emphasis . action }
+        emphasisAction := Text actionBlockFromEmphasis:emphasis.
+        emphasisAction notNil ifTrue:[
+            ^ { emphasis . emphasisAction }
         ].
     ].    
     ^ #(nil nil).