Skip to content

Commit

Permalink
feat: use the shell's theme's colors in showFormHeader
Browse files Browse the repository at this point in the history
FossilOrigin-Name: d8408ed078353a5914a3d0d8bedf9851cce2169115ef0946e0b4967388354c09
  • Loading branch information
thindil committed Dec 9, 2023
1 parent 2c1ad2a commit e10f1ab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/output.nim
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ proc showOutput*(message; db; newLine: bool = true;
else:
message
try:
stdout.write(a = style(ss = newMessage, style = getColor(db = db, name = color)))
stdout.write(a = style(ss = newMessage, style = getColor(db = db,
name = color)))
except IOError, ValueError:
try:
stdout.write(s = newMessage)
Expand Down Expand Up @@ -138,7 +139,8 @@ proc showFormHeader*(message; width: ColumnAmount = (try: terminalWidth().Column
if headerType == "hidden":
return
var table: TerminalTable = TerminalTable()
table.add(parts = yellow(ss = message.center(width = width.int)))
table.add(parts = style(ss = message.center(width = width.int),
style = getColor(db = db, name = headers)))
case headerType
of "unicode":
table.echoTableSeps(seps = boxSeps)
Expand Down

0 comments on commit e10f1ab

Please sign in to comment.