add the framework:standard-style-list:weight preference
This commit is contained in:
parent
580e49f520
commit
5d815a0345
|
@ -373,6 +373,11 @@
|
||||||
(update-standard-style
|
(update-standard-style
|
||||||
(λ (the-delta)
|
(λ (the-delta)
|
||||||
(send the-delta set-smoothing-on sym))))
|
(send the-delta set-smoothing-on sym))))
|
||||||
|
|
||||||
|
(define (set-font-weight sym)
|
||||||
|
(update-standard-style
|
||||||
|
(λ (the-delta)
|
||||||
|
(send the-delta set-weight-on sym))))
|
||||||
|
|
||||||
(define (update-standard-style cng-delta)
|
(define (update-standard-style cng-delta)
|
||||||
(let* ([the-standard (send standard-style-list find-named-style "Standard")]
|
(let* ([the-standard (send standard-style-list find-named-style "Standard")]
|
||||||
|
@ -415,11 +420,14 @@
|
||||||
(set-font-size (get-current-preferred-font-size))
|
(set-font-size (get-current-preferred-font-size))
|
||||||
(set-font-name (preferences:get 'framework:standard-style-list:font-name))
|
(set-font-name (preferences:get 'framework:standard-style-list:font-name))
|
||||||
(set-font-smoothing (preferences:get 'framework:standard-style-list:smoothing))
|
(set-font-smoothing (preferences:get 'framework:standard-style-list:smoothing))
|
||||||
|
(set-font-weight (preferences:get 'framework:standard-style-list:weight))
|
||||||
(preferences:add-callback 'framework:standard-style-list:font-size
|
(preferences:add-callback 'framework:standard-style-list:font-size
|
||||||
(λ (p v)
|
(λ (p v)
|
||||||
(set-font-size/callback (font-size-pref->current-font-size v))))
|
(set-font-size/callback (font-size-pref->current-font-size v))))
|
||||||
(preferences:add-callback 'framework:standard-style-list:font-name (λ (p v) (set-font-name v)))
|
(preferences:add-callback 'framework:standard-style-list:font-name (λ (p v) (set-font-name v)))
|
||||||
(preferences:add-callback 'framework:standard-style-list:smoothing (λ (p v) (set-font-smoothing v)))
|
(preferences:add-callback 'framework:standard-style-list:smoothing
|
||||||
|
(λ (p v) (set-font-smoothing v)))
|
||||||
|
(preferences:add-callback 'framework:standard-style-list:weight (λ (p v) (set-font-weight v)))
|
||||||
(define fl (get-face-list))
|
(define fl (get-face-list))
|
||||||
(unless (member (preferences:get 'framework:standard-style-list:font-name) fl)
|
(unless (member (preferences:get 'framework:standard-style-list:font-name) fl)
|
||||||
(define preferred-font
|
(define preferred-font
|
||||||
|
|
|
@ -263,6 +263,12 @@
|
||||||
(λ (x)
|
(λ (x)
|
||||||
(memq x '(unsmoothed partly-smoothed smoothed default))))
|
(memq x '(unsmoothed partly-smoothed smoothed default))))
|
||||||
|
|
||||||
|
(preferences:set-default
|
||||||
|
'framework:standard-style-list:weight
|
||||||
|
'normal
|
||||||
|
(λ (x)
|
||||||
|
(memq x '(normal light bold))))
|
||||||
|
|
||||||
(editor:set-standard-style-list-pref-callbacks)
|
(editor:set-standard-style-list-pref-callbacks)
|
||||||
|
|
||||||
(let ([gray-level
|
(let ([gray-level
|
||||||
|
|
|
@ -30,4 +30,4 @@
|
||||||
|
|
||||||
(define pkg-authors '(mflatt robby))
|
(define pkg-authors '(mflatt robby))
|
||||||
|
|
||||||
(define version "1.16")
|
(define version "1.17")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user