fix blubox / lock coordinate computation

when the blue box doesn't fit in the visible region
in one direction (either x or y) but does fit
in the other region, then it was being drawn in
the wrong place

This code is still sub-optimal, since it isn't leaving
space for the words underneath the lock in the case
the lock is near the bottom of the visible region, but
it seems better to just let that be invisible rather
than make the lock float a bit in that case.

closes PR 13142
This commit is contained in:
Robby Findler 2012-11-22 11:03:45 -06:00
parent 279e5aa0d9
commit 2253e90479

View File

@ -348,9 +348,13 @@
(define bmp-view-x (+ view-left blue-box-margin)) (define bmp-view-x (+ view-left blue-box-margin))
(define bmp-view-y (- view-bottom blue-box-margin lock-height)) (define bmp-view-y (- view-bottom blue-box-margin lock-height))
(cond (cond
[(or (bmp-bluebox-x . <= . bmp-view-x) [(and (bmp-bluebox-x . <= . bmp-view-x)
(bmp-bluebox-y . >= . bmp-view-y)) (bmp-bluebox-y . >= . bmp-view-y))
(values br bt bmp-view-x bmp-view-y)] (values br bt bmp-view-x bmp-view-y)]
[(bmp-bluebox-y . >= . bmp-view-y)
(values br bt bmp-bluebox-x bmp-view-y)]
[(bmp-bluebox-x . <= . bmp-view-x)
(values br bt bmp-view-x bmp-bluebox-y)]
[else [else
(values br bt bmp-bluebox-x bmp-bluebox-y)])] (values br bt bmp-bluebox-x bmp-bluebox-y)])]
[else [else