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.results = mauview.NewTextView().SetRegions(true)
fs.search = mauview.NewInputArea(). fs.search = mauview.NewInputArea().
SetChangedFunc(fs.changeHandler). SetChangedFunc(fs.changeHandler).
SetTextColor(tcell.ColorWhite). SetTextColor(tcell.ColorDefault).
SetBackgroundColor(tcell.ColorDarkCyan) SetBackgroundColor(tcell.ColorDarkCyan)
fs.search.Focus() fs.search.Focus()

View File

@ -76,7 +76,8 @@ func NewHelpModal(parent *MainView) *HelpModal {
text := mauview.NewTextView(). text := mauview.NewTextView().
SetText(helpText). SetText(helpText).
SetScrollable(true). SetScrollable(true).
SetWrap(false) SetWrap(false).
SetTextColor(tcell.ColorDefault)
box := mauview.NewBox(text). box := mauview.NewBox(text).
SetBorder(true). 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) { func (ml *MemberList) Draw(screen mauview.Screen) {
width, _ := screen.Size() 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 { for y, member := range ml.list {
if member.Sigil != ' ' { if member.Sigil != ' ' {
screen.SetCell(0, y, sigilStyle, member.Sigil) screen.SetCell(0, y, sigilStyle, member.Sigil)

View File

@ -96,8 +96,8 @@ func NewRoomList(parent *MainView) *RoomList {
scrollOffset: 0, scrollOffset: 0,
mainTextColor: tcell.ColorWhite, mainTextColor: tcell.ColorDefault,
selectedTextColor: tcell.ColorWhite, selectedTextColor: tcell.ColorDefault,
selectedBackgroundColor: tcell.ColorDarkGreen, selectedBackgroundColor: tcell.ColorDarkGreen,
} }
for _, tag := range list.tags { 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.Room.SetPostLoad(view.loadTyping)
view.input. view.input.
SetTextColor(tcell.ColorDefault).
SetBackgroundColor(tcell.ColorDefault). SetBackgroundColor(tcell.ColorDefault).
SetPlaceholder("Send a message..."). SetPlaceholder("Send a message...").
SetPlaceholderTextColor(tcell.ColorGray). SetPlaceholderTextColor(tcell.ColorGray).
@ -130,7 +131,7 @@ func NewRoomView(parent *MainView, room *rooms.Room) *RoomView {
} }
view.topic. view.topic.
SetTextColor(tcell.ColorWhite). SetTextColor(tcell.ColorDefault).
SetBackgroundColor(tcell.ColorDarkGreen) SetBackgroundColor(tcell.ColorDarkGreen)
view.status.SetBackgroundColor(tcell.ColorDimGray) view.status.SetBackgroundColor(tcell.ColorDimGray)

View File

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