fix clipping problem in sirmail reader
svn: r8743
This commit is contained in:
parent
ba63bd6f95
commit
a4d6fa5a0e
|
@ -793,11 +793,22 @@
|
||||||
(let ([w (get-width)])
|
(let ([w (get-width)])
|
||||||
(let-values ([(_1 h _2 _3) (send dc get-text-extent "yX")])
|
(let-values ([(_1 h _2 _3) (send dc get-text-extent "yX")])
|
||||||
|
|
||||||
(let ([old-clip (send dc get-clipping-region)])
|
(let* ([old-clip (send dc get-clipping-region)]
|
||||||
(send dc set-clipping-rect x y (+ FROM-WIDTH (/ first-gap 2) (- line-space)) h)
|
[new-clip #f]
|
||||||
|
[set-clip
|
||||||
|
(lambda (x y w h)
|
||||||
|
(if old-clip
|
||||||
|
(begin
|
||||||
|
(send dc set-clipping-region #f)
|
||||||
|
(unless new-clip
|
||||||
|
(set! new-clip (make-object region% dc)))
|
||||||
|
(send new-clip set-rectangle x y w h)
|
||||||
|
(send new-clip intersect old-clip)
|
||||||
|
(send dc set-clipping-region new-clip))
|
||||||
|
(send dc set-clipping-rect x y w h)))])
|
||||||
|
(set-clip x y (+ FROM-WIDTH (/ first-gap 2) (- line-space)) h)
|
||||||
(send dc draw-text from (+ x left-edge-space) y #t)
|
(send dc draw-text from (+ x left-edge-space) y #t)
|
||||||
(send dc set-clipping-rect
|
(set-clip (+ x FROM-WIDTH (/ first-gap 2) line-space)
|
||||||
(+ x FROM-WIDTH (/ first-gap 2) line-space)
|
|
||||||
y
|
y
|
||||||
(+ SUBJECT-WIDTH (/ second-gap 2) (- line-space))
|
(+ SUBJECT-WIDTH (/ second-gap 2) (- line-space))
|
||||||
h)
|
h)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user