ui: use ColorDefault where appropriate

This commit is contained in:
prenev 2021-04-04 01:09:27 +03:00
parent 3964b6fd89
commit f97ddba86e
6 changed files with 10 additions and 8 deletions

View File

@ -58,7 +58,7 @@ func NewFuzzySearchModal(mainView *MainView, width int, height int) *FuzzySearch
fs.results = mauview.NewTextView().SetRegions(true)
fs.search = mauview.NewInputArea().
SetChangedFunc(fs.changeHandler).
SetTextColor(tcell.ColorWhite).
SetTextColor(tcell.ColorDefault).
SetBackgroundColor(tcell.ColorDarkCyan)
fs.search.Focus()

View File

@ -76,7 +76,8 @@ func NewHelpModal(parent *MainView) *HelpModal {
text := mauview.NewTextView().
SetText(helpText).
SetScrollable(true).
SetWrap(false)
SetWrap(false).
SetTextColor(tcell.ColorDefault)
box := mauview.NewBox(text).
SetBorder(true).

View File

@ -107,7 +107,7 @@ func (ml *MemberList) Update(data map[id.UserID]*rooms.Member, levels *event.Pow
func (ml *MemberList) Draw(screen mauview.Screen) {
width, _ := screen.Size()
sigilStyle := tcell.StyleDefault.Background(tcell.ColorGreen).Foreground(tcell.ColorWhite)
sigilStyle := tcell.StyleDefault.Background(tcell.ColorGreen).Foreground(tcell.ColorDefault)
for y, member := range ml.list {
if member.Sigil != ' ' {
screen.SetCell(0, y, sigilStyle, member.Sigil)

View File

@ -96,8 +96,8 @@ func NewRoomList(parent *MainView) *RoomList {
scrollOffset: 0,
mainTextColor: tcell.ColorWhite,
selectedTextColor: tcell.ColorWhite,
mainTextColor: tcell.ColorDefault,
selectedTextColor: tcell.ColorDefault,
selectedBackgroundColor: tcell.ColorDarkGreen,
}
for _, tag := range list.tags {

View File

@ -118,6 +118,7 @@ func NewRoomView(parent *MainView, room *rooms.Room) *RoomView {
view.Room.SetPostLoad(view.loadTyping)
view.input.
SetTextColor(tcell.ColorDefault).
SetBackgroundColor(tcell.ColorDefault).
SetPlaceholder("Send a message...").
SetPlaceholderTextColor(tcell.ColorGray).
@ -130,7 +131,7 @@ func NewRoomView(parent *MainView, room *rooms.Room) *RoomView {
}
view.topic.
SetTextColor(tcell.ColorWhite).
SetTextColor(tcell.ColorDefault).
SetBackgroundColor(tcell.ColorDarkGreen)
view.status.SetBackgroundColor(tcell.ColorDimGray)

View File

@ -106,7 +106,7 @@ func NewVerificationModal(mainView *MainView, device *crypto.DeviceIdentity, tim
vm.inputBar = mauview.NewInputField().
SetBackgroundColor(tcell.ColorDefault).
SetPlaceholderTextColor(tcell.ColorWhite)
SetPlaceholderTextColor(tcell.ColorDefault)
flex := mauview.NewFlex().
SetDirection(mauview.FlexRow).
@ -163,7 +163,7 @@ func (vm *VerificationModal) VerifySASMatch(device *crypto.DeviceIdentity, data
"same %s as below, then type \"yes\" to\n"+
"accept, or \"no\" to reject", typeName))
vm.inputBar.
SetTextColor(tcell.ColorWhite).
SetTextColor(tcell.ColorDefault).
SetBackgroundColor(tcell.ColorDarkCyan).
SetPlaceholder("Type \"yes\" or \"no\"").
Focus()