summaryrefslogtreecommitdiffstats
path: root/tui/format.go
diff options
context:
space:
mode:
authorDaniel Milde <daniel@milde.cz>2021-02-21 11:38:50 +0100
committerDaniel Milde <daniel@milde.cz>2021-02-21 11:38:50 +0100
commite230631dcd8089d1c9305e582e8584422ed823c8 (patch)
treef39536618688adaab9f6f6f9ab011c4db80ef615 /tui/format.go
parent893f668f92adbc0a1f336ce8e656e5c6fbbf1ebd (diff)
black background for text on progress modal
Diffstat (limited to 'tui/format.go')
-rw-r--r--tui/format.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/tui/format.go b/tui/format.go
index d599201..d4cf08e 100644
--- a/tui/format.go
+++ b/tui/format.go
@@ -25,9 +25,9 @@ func (ui *UI) formatFileRow(item *analyze.File) string {
}
if ui.showApparentSize {
- row += fmt.Sprintf("%21s", ui.formatSize(item.Size, false))
+ row += fmt.Sprintf("%21s", ui.formatSize(item.Size, false, true))
} else {
- row += fmt.Sprintf("%21s", ui.formatSize(item.Usage, false))
+ row += fmt.Sprintf("%21s", ui.formatSize(item.Usage, false, true))
}
row += getUsageGraph(part)
@@ -43,7 +43,7 @@ func (ui *UI) formatFileRow(item *analyze.File) string {
return row
}
-func (ui *UI) formatSize(size int64, reverseColor bool) string {
+func (ui *UI) formatSize(size int64, reverseColor bool, transparentBg bool) string {
var color string
if reverseColor {
if ui.useColors {
@@ -52,7 +52,11 @@ func (ui *UI) formatSize(size int64, reverseColor bool) string {
color = "[black:white:-]"
}
} else {
- color = "[white:-:-]"
+ if transparentBg {
+ color = "[white:-:-]"
+ } else {
+ color = "[white:black:-]"
+ }
}
switch {