* Updated tview to the latest version
* the edit mode of the editor won't color the background anymore, instead it
will now color the border of the component.
MODIFY
go.mod
go.mod
@@ -7,7 +7,7 @@ require (
github.com/Bios-Marcel/discordgo v0.20.4
github.com/Bios-Marcel/goclipimg v0.0.0-20190417192721-b58a8831f27d
github.com/Bios-Marcel/shortnotforlong v0.0.0-20190220133053-9074a923cf4d
- github.com/Bios-Marcel/tview v0.0.0-20190420141116-9d8107874a47
+ github.com/Bios-Marcel/tview v0.0.0-20190520085441-3a707d5c3185
github.com/alecthomas/chroma v0.6.3
github.com/atotto/clipboard v0.1.2
github.com/gdamore/tcell v1.1.2-0.20190319073105-ec71b09872d7

MODIFY
go.sum
go.sum
@@ -10,6 +10,8 @@ github.com/Bios-Marcel/shortnotforlong v0.0.0-20190220133053-9074a923cf4d h1:E5I
github.com/Bios-Marcel/shortnotforlong v0.0.0-20190220133053-9074a923cf4d/go.mod h1:baXE5Qfk1rJLPL8LZK6mDNv7x84m1+OVKfJw24Wu4W4=
github.com/Bios-Marcel/tview v0.0.0-20190420141116-9d8107874a47 h1:0Wrf+/c4gpjS2Sf5enxEAdIGvZ8DJPEwd5Ik6Z/nCcw=
github.com/Bios-Marcel/tview v0.0.0-20190420141116-9d8107874a47/go.mod h1:GMXdWTT0HANfXLSKD86y+L0ZNzigLVtZB76T01m3VvI=
+github.com/Bios-Marcel/tview v0.0.0-20190520085441-3a707d5c3185 h1:m/gS5OnCG/DDhOJKPCnzKqyBE0Tf5+0GEf714GBSggQ=
+github.com/Bios-Marcel/tview v0.0.0-20190520085441-3a707d5c3185/go.mod h1:GMXdWTT0HANfXLSKD86y+L0ZNzigLVtZB76T01m3VvI=
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U=
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI=
github.com/alecthomas/chroma v0.6.3 h1:8H1D0yddf0mvgvO4JDBKnzLd9ERmzzAijBxnZXGV/FA=

MODIFY
ui/editor.go
ui/editor.go
@@ -393,6 +393,18 @@ func (editor *Editor) SetText(text string) {
editor.triggerHeightRequestIfNeccessary()
}
+// SetBorderFocusColor delegates to the underlying components
+// SetBorderFocusColor method.
+func (editor *Editor) SetBorderFocusColor(color tcell.Color) {
+ editor.internalTextView.SetBorderFocusColor(color)
+}
+
+// SetBorderColor delegates to the underlying components SetBorderColor
+// method.
+func (editor *Editor) SetBorderColor(color tcell.Color) {
+ editor.internalTextView.SetBorderColor(color)
+}
+
// SetInputCapture sets the alternative input capture that will be used if the
// components default controls aren't being triggered.
func (editor *Editor) SetInputCapture(captureFunc func(event *tcell.EventKey) *tcell.EventKey) {

MODIFY
ui/window.go
ui/window.go
@@ -1496,7 +1496,8 @@ func (window *Window) ExecuteCommand(command string) {
func (window *Window) startEditingMessage(message *discordgo.Message) {
if message.Author.ID == window.session.State.User.ID {
window.messageInput.SetText(message.Content)
- window.messageInput.SetBackgroundColor(tcell.ColorDarkGoldenrod)
+ window.messageInput.SetBorderColor(tcell.ColorYellow)
+ window.messageInput.SetBorderFocusColor(tcell.ColorYellow)
window.editingMessageID = &message.ID
window.app.SetFocus(window.messageInput.GetPrimitive())
}
@@ -1509,7 +1510,8 @@ func (window *Window) exitMessageEditMode() {
func (window *Window) exitMessageEditModeAndKeepText() {
window.editingMessageID = nil
- window.messageInput.SetBackgroundColor(tview.Styles.PrimitiveBackgroundColor)
+ window.messageInput.SetBorderColor(tview.Styles.BorderColor)
+ window.messageInput.SetBorderFocusColor(tview.Styles.BorderFocusColor)
}
//ShowErrorDialog shows a simple error dialog that has only an Okay button,

* Updated tview to the latest version
* the edit mode of the editor won't color the background anymore, instead it
will now color the border of the component.