Better colors with black on white themes
Added ColorDefault to more places by default and override some other specific places with white for better contrast. This should not affect White on black themes.
This commit is contained in:
parent
5db151d90f
commit
8450651a03
@ -98,7 +98,7 @@ func NewRoomList(parent *MainView) *RoomList {
|
|||||||
scrollOffset: 0,
|
scrollOffset: 0,
|
||||||
|
|
||||||
mainTextColor: tcell.ColorDefault,
|
mainTextColor: tcell.ColorDefault,
|
||||||
selectedTextColor: tcell.ColorDefault,
|
selectedTextColor: tcell.ColorWhite,
|
||||||
selectedBackgroundColor: tcell.ColorDarkGreen,
|
selectedBackgroundColor: tcell.ColorDarkGreen,
|
||||||
}
|
}
|
||||||
for _, tag := range list.tags {
|
for _, tag := range list.tags {
|
||||||
|
@ -132,7 +132,7 @@ func NewRoomView(parent *MainView, room *rooms.Room) *RoomView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
view.topic.
|
view.topic.
|
||||||
SetTextColor(tcell.ColorDefault).
|
SetTextColor(tcell.ColorWhite).
|
||||||
SetBackgroundColor(tcell.ColorDarkGreen)
|
SetBackgroundColor(tcell.ColorDarkGreen)
|
||||||
|
|
||||||
view.status.SetBackgroundColor(tcell.ColorDimGray)
|
view.status.SetBackgroundColor(tcell.ColorDimGray)
|
||||||
|
2
ui/ui.go
2
ui/ui.go
@ -48,6 +48,8 @@ type GomuksUI struct {
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
mauview.Styles.PrimitiveBackgroundColor = tcell.ColorDefault
|
mauview.Styles.PrimitiveBackgroundColor = tcell.ColorDefault
|
||||||
|
mauview.Styles.PrimaryTextColor = tcell.ColorDefault
|
||||||
|
mauview.Styles.BorderColor = tcell.ColorDefault
|
||||||
mauview.Styles.ContrastBackgroundColor = tcell.ColorDarkGreen
|
mauview.Styles.ContrastBackgroundColor = tcell.ColorDarkGreen
|
||||||
if tcellDB := os.Getenv("TCELLDB"); len(tcellDB) == 0 {
|
if tcellDB := os.Getenv("TCELLDB"); len(tcellDB) == 0 {
|
||||||
if info, err := os.Stat("/usr/share/tcell/database"); err == nil && info.IsDir() {
|
if info, err := os.Stat("/usr/share/tcell/database"); err == nil && info.IsDir() {
|
||||||
|
@ -77,12 +77,20 @@ func (ui *GomuksUI) NewLoginView() mauview.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hs := ui.gmx.Config().HS
|
hs := ui.gmx.Config().HS
|
||||||
view.homeserver.SetPlaceholder("https://example.com").SetText(hs)
|
view.homeserver.SetPlaceholder("https://example.com").SetText(hs).SetTextColor(tcell.ColorWhite)
|
||||||
view.username.SetPlaceholder("@user:example.com").SetText(string(ui.gmx.Config().UserID))
|
view.username.SetPlaceholder("@user:example.com").SetText(string(ui.gmx.Config().UserID)).SetTextColor(tcell.ColorWhite)
|
||||||
view.password.SetPlaceholder("correct horse battery staple").SetMaskCharacter('*')
|
view.password.SetPlaceholder("correct horse battery staple").SetMaskCharacter('*').SetTextColor(tcell.ColorWhite)
|
||||||
|
|
||||||
view.quitButton.SetOnClick(func() { ui.gmx.Stop(true) }).SetBackgroundColor(tcell.ColorDarkCyan)
|
view.quitButton.
|
||||||
view.loginButton.SetOnClick(view.Login).SetBackgroundColor(tcell.ColorDarkCyan)
|
SetOnClick(func() { ui.gmx.Stop(true) }).
|
||||||
|
SetBackgroundColor(tcell.ColorDarkCyan).
|
||||||
|
SetForegroundColor(tcell.ColorWhite).
|
||||||
|
SetFocusedForegroundColor(tcell.ColorWhite)
|
||||||
|
view.loginButton.
|
||||||
|
SetOnClick(view.Login).
|
||||||
|
SetBackgroundColor(tcell.ColorDarkCyan).
|
||||||
|
SetForegroundColor(tcell.ColorWhite).
|
||||||
|
SetFocusedForegroundColor(tcell.ColorWhite)
|
||||||
|
|
||||||
view.
|
view.
|
||||||
SetColumns([]int{1, 10, 1, 30, 1}).
|
SetColumns([]int{1, 10, 1, 30, 1}).
|
||||||
|
Loading…
Reference in New Issue
Block a user