forked from Mirrors/gomuks
Enforce title bar styling on display mode switch
This commit is contained in:
parent
6bb265cc66
commit
3b26a8fbd1
1 changed files with 17 additions and 10 deletions
|
@ -132,15 +132,9 @@ func NewRoomView(parent *MainView, room *rooms.Room) *RoomView {
|
|||
}
|
||||
|
||||
// TODO: update when displaymode toggled
|
||||
if view.config.Preferences.DisplayMode != config.DisplayModeModern {
|
||||
view.topic.
|
||||
SetTextColor(tcell.ColorWhite).
|
||||
SetBackgroundColor(tcell.ColorDarkGreen)
|
||||
} else {
|
||||
view.topic.
|
||||
SetTextColor(tcell.ColorDefault).
|
||||
SetTextAlign(mauview.AlignCenter)
|
||||
}
|
||||
|
||||
view.status.SetBackgroundColor(tcell.ColorDimGray)
|
||||
|
||||
|
@ -314,7 +308,20 @@ func (view *RoomView) Draw(screen mauview.Screen) {
|
|||
if view.config.Preferences.DisplayMode == config.DisplayModeModern {
|
||||
view.topicScreen.Height = 2
|
||||
view.contentScreen.OffsetY = 2
|
||||
contentHeight -= 1
|
||||
contentHeight--
|
||||
|
||||
view.topic.
|
||||
SetTextColor(tcell.ColorDefault).
|
||||
SetBackgroundColor(tcell.ColorDefault).
|
||||
SetTextAlign(mauview.AlignCenter)
|
||||
} else {
|
||||
view.topicScreen.Height = TopicBarHeight
|
||||
view.contentScreen.OffsetY = StatusBarHeight
|
||||
|
||||
view.topic.
|
||||
SetTextColor(tcell.ColorWhite).
|
||||
SetBackgroundColor(tcell.ColorDarkGreen).
|
||||
SetTextAlign(mauview.AlignLeft)
|
||||
}
|
||||
|
||||
view.topicScreen.Width = width
|
||||
|
|
Loading…
Add table
Reference in a new issue