mirror of
https://github.com/VladimirMarkelov/clui.git
synced 2025-04-28 13:48:50 +08:00
label: multiline
Currently when a label is multiline Draw() will paint it with black/while foreground/background colors. This patch makes sure we keep theme consistent across the single line and multiline use cases.
This commit is contained in:
parent
4d8b1ae09a
commit
492d582ad6
2
label.go
2
label.go
@ -84,7 +84,7 @@ func (l *Label) Draw() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if l.multiline {
|
if l.multiline {
|
||||||
parser := NewColorParser(l.title, ColorWhite, ColorBlack)
|
parser := NewColorParser(l.title, fg, bg)
|
||||||
elem := parser.NextElement()
|
elem := parser.NextElement()
|
||||||
xx, yy := l.x, l.y
|
xx, yy := l.x, l.y
|
||||||
for elem.Type != ElemEndOfText {
|
for elem.Type != ElemEndOfText {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user