From 8a4567f5aa3a73947f2983dcb0675f4e97299fd0 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 27 Aug 2012 20:13:16 -0500 Subject: [PATCH] adjust the tooltip position so it goes to the end of the line where the arrowhead sits --- collects/drracket/private/syncheck/gui.rkt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/collects/drracket/private/syncheck/gui.rkt b/collects/drracket/private/syncheck/gui.rkt index 5d1126b94d..8f7d28ec1c 100644 --- a/collects/drracket/private/syncheck/gui.rkt +++ b/collects/drracket/private/syncheck/gui.rkt @@ -1211,10 +1211,11 @@ If the namespace does not, they are colored the unbound color. (define left-pos (tooltip-info-pos-left tooltip)) (define right-pos (tooltip-info-pos-right tooltip)) (define text (tooltip-info-text tooltip)) - (send text position-location left-pos xlb ylb #t) - (send text position-location right-pos xrb yrb #f) - (define-values (xl-off yl-off) (send text editor-location-to-dc-location (unbox xlb) (unbox ylb))) - (define-values (xr-off yr-off) (send text editor-location-to-dc-location (unbox xrb) (unbox yrb))) + + (define eol-pos (line-end-position (position-line right-pos))) + + (send text position-location eol-pos xlb ylb #t #t) + (define-values (x-off y-off) (send text editor-location-to-dc-location (+ (unbox xlb) 4) (unbox ylb))) (define window (let loop ([ed text]) (cond @@ -1227,12 +1228,8 @@ If the namespace does not, they are colored the unbound color. (cond [window (define (c n) (inexact->exact (round n))) - (define-values (glx gly) (send window client->screen (c xl-off) (c yl-off))) - (define-values (grx gry) (send window client->screen (c xr-off) (c yr-off))) - (values (min glx grx) - (min gly gry) - (max glx grx) - (max gly gry))] + (define-values (gx gy) (send window client->screen (c x-off) (c y-off))) + (values gx gy gx gy)] [else (values #f #f #f #f)]))