enable scoll via copy
This commit is contained in:
parent
33395ae1cf
commit
bdac2da540
|
@ -157,6 +157,8 @@
|
||||||
|
|
||||||
(define (keep-style l s) (if (memq s l) (list s) null))
|
(define (keep-style l s) (if (memq s l) (list s) null))
|
||||||
|
|
||||||
|
(define SCROLL-VIA-COPY? #t)
|
||||||
|
|
||||||
(defclass editor-canvas% canvas%
|
(defclass editor-canvas% canvas%
|
||||||
|
|
||||||
(inherit refresh get-canvas-background get-dc
|
(inherit refresh get-canvas-background get-dc
|
||||||
|
@ -971,7 +973,7 @@
|
||||||
(set! noloop? savenoloop?)
|
(set! noloop? savenoloop?)
|
||||||
|
|
||||||
(when (and change? refresh?)
|
(when (and change? refresh?)
|
||||||
(if (and #f ;; special scrolling disabled: not faster with Cocoa, broken for Windows
|
(if (and SCROLL-VIA-COPY?
|
||||||
(not need-refresh?)
|
(not need-refresh?)
|
||||||
(not lazy-refresh?)
|
(not lazy-refresh?)
|
||||||
(get-canvas-background)
|
(get-canvas-background)
|
||||||
|
@ -986,7 +988,8 @@
|
||||||
(get-view vx vy vw vh) ; editor coords
|
(get-view vx vy vw vh) ; editor coords
|
||||||
(cond
|
(cond
|
||||||
[(and (new-fy . < . old-fy)
|
[(and (new-fy . < . old-fy)
|
||||||
(old-fy . < . (+ new-fy vh)))
|
(old-fy . < . (+ new-fy vh))
|
||||||
|
(integer? (send (get-dc) get-backing-scale)))
|
||||||
(let ([dc (get-dc)])
|
(let ([dc (get-dc)])
|
||||||
(begin-refresh-sequence)
|
(begin-refresh-sequence)
|
||||||
(send dc copy
|
(send dc copy
|
||||||
|
@ -998,7 +1001,8 @@
|
||||||
#t)
|
#t)
|
||||||
(end-refresh-sequence))]
|
(end-refresh-sequence))]
|
||||||
[(and (old-fy . < . new-fy)
|
[(and (old-fy . < . new-fy)
|
||||||
(new-fy . < . (+ old-fy vh)))
|
(new-fy . < . (+ old-fy vh))
|
||||||
|
(integer? (send (get-dc) get-backing-scale)))
|
||||||
(let ([dc (get-dc)])
|
(let ([dc (get-dc)])
|
||||||
(begin-refresh-sequence)
|
(begin-refresh-sequence)
|
||||||
(send dc copy
|
(send dc copy
|
||||||
|
|
Loading…
Reference in New Issue
Block a user