Font size changes; prefs setting overrides default
svn: r4308 original commit: ba5c8d5b07b7e37322cd6f4fee2a0a193ac2b467
This commit is contained in:
parent
3c47257395
commit
b59b3e692c
|
@ -36,6 +36,17 @@
|
||||||
(new syntax-controller%
|
(new syntax-controller%
|
||||||
(properties-controller this)))
|
(properties-controller this)))
|
||||||
|
|
||||||
|
;; FIXME: Why doesn't this work?
|
||||||
|
#;
|
||||||
|
(when (current-syntax-font-size)
|
||||||
|
(let* ([style-list (send -text get-style-list)]
|
||||||
|
[standard (send style-list find-named-style "Standard")])
|
||||||
|
(send style-list replace-named-style "Standard"
|
||||||
|
(send style-list find-or-create-style
|
||||||
|
standard
|
||||||
|
(make-object style-delta% 'change-size
|
||||||
|
(current-syntax-font-size))))))
|
||||||
|
|
||||||
(send -text lock #t)
|
(send -text lock #t)
|
||||||
(send -split-panel set-percentages
|
(send -split-panel set-percentages
|
||||||
(let ([pp (pref:props-percentage)]) (list (- 1 pp) pp)))
|
(let ([pp (pref:props-percentage)]) (list (- 1 pp) pp)))
|
||||||
|
@ -125,9 +136,8 @@
|
||||||
(send new-colorer highlight-syntaxes hi-stxs hi-color)))))))
|
(send new-colorer highlight-syntaxes hi-stxs hi-color)))))))
|
||||||
|
|
||||||
(define/private (calculate-columns)
|
(define/private (calculate-columns)
|
||||||
(define style-list (send -text get-style-list))
|
(define style (code-style -text))
|
||||||
(define standard (send style-list find-named-style "Standard"))
|
(define char-width (send style get-text-width (send -ecanvas get-dc)))
|
||||||
(define char-width (send standard get-text-width (send -ecanvas get-dc)))
|
|
||||||
(define-values (canvas-w canvas-h) (send -ecanvas get-client-size))
|
(define-values (canvas-w canvas-h) (send -ecanvas get-client-size))
|
||||||
(sub1 (inexact->exact (floor (/ canvas-w char-width)))))
|
(sub1 (inexact->exact (floor (/ canvas-w char-width)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user