mirror of
https://github.com/unclebob/more-speech.git
synced 2024-09-30 10:30:56 +00:00
Word wrap the edit window using :wrap-lines in a 'styled-pane'
This commit is contained in:
parent
b171c52458
commit
89868f3d0d
@ -189,3 +189,4 @@ the proposition that all men are created equal."
|
||||
event {:content content :tags [[:p "deadbeef"]]}]
|
||||
(should= "#[1]" (replace-references event))))))
|
||||
|
||||
|
||||
|
@ -86,11 +86,7 @@
|
||||
(let [tag (first tags)]
|
||||
(if (= (first tag) :subject)
|
||||
(abbreviate (second tag) 90)
|
||||
(recur (rest tags))
|
||||
))
|
||||
|
||||
)
|
||||
)
|
||||
(recur (rest tags))))))
|
||||
|
||||
(declare lookup-reference)
|
||||
|
||||
@ -118,4 +114,3 @@
|
||||
(str "id:" (abbreviate id-string 8))
|
||||
name)]
|
||||
(str "@" name)))))
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
[more-speech.ui.swing.ui-context :refer :all])
|
||||
(:use [seesaw core]))
|
||||
|
||||
(declare format-content)
|
||||
|
||||
(defn make-edit-window [kind]
|
||||
(let [reply? (= kind :reply)
|
||||
event-context (:event-context @ui-context)
|
||||
@ -16,7 +18,8 @@
|
||||
edit-frame (frame :title (name kind)
|
||||
:size [1000 :by 500]
|
||||
:on-close :dispose)
|
||||
edit-area (editor-pane :font config/default-font)
|
||||
edit-area (styled-text :font config/default-font
|
||||
:wrap-lines? true)
|
||||
send-button (button :text "Send")
|
||||
event-map (:text-event-map event-state)
|
||||
selected-id (if reply? (:selected-event @event-context) nil)
|
||||
@ -40,4 +43,4 @@
|
||||
:north subject-panel
|
||||
:center (scrollable edit-area)
|
||||
:south (flow-panel :items [send-button])))
|
||||
(show! edit-frame)))
|
||||
(show! edit-frame)))
|
||||
|
Loading…
Reference in New Issue
Block a user