fixed up bugs when font colors are not set to black on white

svn: r1781
This commit is contained in:
Robby Findler 2006-01-07 15:34:22 +00:00
parent 8f549148f1
commit 8fdf54d02b
3 changed files with 21 additions and 6 deletions

View File

@ -140,7 +140,9 @@
[(2) 'smoothed] [(2) 'smoothed]
[(3) 'default])))))] [(3) 'default])))))]
[text (make-object (editor:standard-style-list-mixin text%))] [text (make-object (text:foreground-color-mixin
(editor:standard-style-list-mixin
text:basic%)))]
[ex-panel (make-object horizontal-panel% main)] [ex-panel (make-object horizontal-panel% main)]
[msg (make-object message% (string-constant example-text) ex-panel)] [msg (make-object message% (string-constant example-text) ex-panel)]
[canvas (make-object canvas:color% main text)] [canvas (make-object canvas:color% main text)]
@ -169,7 +171,7 @@
(send text set-position 0 0) (send text set-position 0 0)
(send text lock #t) (send text lock #t)
(send text end-edit-sequence))]) (send text end-edit-sequence))])
(send text set-styles-fixed #t)
(preferences:add-callback (preferences:add-callback
'framework:standard-style-list:font-size 'framework:standard-style-list:font-size
(λ (p v) (send size-slider set-value v))) (λ (p v) (send size-slider set-value v)))

View File

@ -879,7 +879,13 @@
(send e end-edit-sequence) (send e end-edit-sequence)
i)) i))
(define display-text% (html-text-mixin text:standard-style-list%)) (define display-text%
(class (html-text-mixin
(text:foreground-color-mixin
text:standard-style-list%))
(super-new)
(inherit set-styles-fixed)
(set-styles-fixed #t)))
;; Class for the panel that has columns titles and ;; Class for the panel that has columns titles and
;; supports clicks to change the sort order ;; supports clicks to change the sort order
@ -1746,7 +1752,7 @@
(vertical-inset 1))) (vertical-inset 1)))
(define header-list (make-object header-list% top-half)) (define header-list (make-object header-list% top-half))
(send (send header-list get-editor) set-line-spacing 0) (send (send header-list get-editor) set-line-spacing 0)
(define message (new editor-canvas% (define message (new canvas:color%
[parent sizing-panel] [parent sizing-panel]
[style '(auto-hscroll)])) [style '(auto-hscroll)]))
(send header-list min-height 20) (send header-list min-height 20)

View File

@ -345,13 +345,14 @@
'(ok)))]) '(ok)))])
(delete-file t))))))) (delete-file t)))))))
(define c (new editor-canvas% (define c (new canvas:color%
[parent (send mailer-frame get-area-container)] [parent (send mailer-frame get-area-container)]
[style '(auto-hscroll)])) [style '(auto-hscroll)]))
(define message-editor-super% (define message-editor-super%
(color:text-mixin (color:text-mixin
(editor:backup-autosave-mixin (editor:backup-autosave-mixin
text:standard-style-list%))) (text:foreground-color-mixin
text:standard-style-list%))))
(define message-editor (make-object (class message-editor-super% (define message-editor (make-object (class message-editor-super%
(inherit reset-region) (inherit reset-region)
@ -649,6 +650,12 @@
(if (string=? to "") (if (string=? to "")
(send message-editor set-position (send message-editor paragraph-end-position 0)) (send message-editor set-position (send message-editor paragraph-end-position 0))
(send message-editor set-position message-start))) (send message-editor set-position message-start)))
(send message-editor change-style
(send (send message-editor get-style-list)
find-named-style
(editor:get-default-color-style-name))
0
(send message-editor last-position))
(send message-editor clear-undos))) (send message-editor clear-undos)))
(send message-editor set-modified #f) (send message-editor set-modified #f)