set the font before computing the distance between the line numbers and the real text. add an option to the general pane to enable line numbers
This commit is contained in:
parent
18504774f0
commit
eb89a429e7
|
@ -316,6 +316,18 @@
|
|||
(make-check-box 'drracket:open-in-tabs
|
||||
(string-constant open-files-in-tabs)
|
||||
editor-panel)
|
||||
(make-check-box 'drracket:show-line-numbers?
|
||||
(string-constant show-line-numbers)
|
||||
editor-panel
|
||||
(lambda (value)
|
||||
(define (drracket:frame? frame)
|
||||
(and (is-a? frame top-level-window<%>)
|
||||
(is-a? frame drracket:unit:frame%)))
|
||||
;; is it a hack to use `get-top-level-windows' ?
|
||||
(define frames (filter drracket:frame? (get-top-level-windows)))
|
||||
(when (not (null? frames))
|
||||
(send (car frames) show-line-numbers! value))))
|
||||
|
||||
(make-check-box 'drracket:show-interactions-on-execute
|
||||
(string-constant show-interactions-on-execute)
|
||||
editor-panel)
|
||||
|
|
|
@ -3902,6 +3902,7 @@ designates the character that triggers autocompletion
|
|||
(define-values (x y) (send dc get-origin))
|
||||
(set! old-origin-x x)
|
||||
(set! old-origin-y y)
|
||||
(setup-dc dc)
|
||||
(define-values (font-width font-height baseline space)
|
||||
(send dc get-text-extent "10000"))
|
||||
;; add an extra 0 so it looks nice
|
||||
|
|
Loading…
Reference in New Issue
Block a user