Some work

This commit is contained in:
2025-10-03 13:35:05 -05:00
parent 4b647d9d41
commit f1e705bba5
4 changed files with 41 additions and 12 deletions

View File

@@ -83,13 +83,14 @@ func (w *BorderedWidget) Draw(screen tcell.Screen) {
if !w.widget.Visible() {
return
}
st := w.style.Dim(!w.Active())
if len(w.title) > 0 {
wh.TitledBorderFilled(w.x, w.y, w.x+w.w, w.y+w.h, w.title, w.border, w.style, screen)
wh.TitledBorderFilled(w.x, w.y, w.x+w.w, w.y+w.h, w.title, w.border, st, screen)
} else {
wh.BorderFilled(w.x, w.y, w.x+w.w, w.y+w.h, w.border, w.style, screen)
wh.BorderFilled(w.x, w.y, w.x+w.w, w.y+w.h, w.border, st, screen)
}
if len(w.help) > 0 {
wh.DrawText(w.x+w.w-len(w.help)-2, w.y+w.h, w.help, w.style, screen)
wh.DrawText(w.x+w.w-len(w.help)-2, w.y+w.h, w.help, st, screen)
}
w.GetPos().DrawOffset(w.widget, screen)
}