Skip to content

Commit

Permalink
Use unicode for finer grained gauges
Browse files Browse the repository at this point in the history
  • Loading branch information
56quarters committed Feb 11, 2024
1 parent afb2c39 commit d8af1fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- Change default colors in `mtop` to dark theme based on tailwind color
palette. #122
- Allow other `mtop` color palettes to be selected via the `--theme` flag. #124
- Switch `mtop` memory, connections, and hit ratio gauges to unicode for finer
grained bars. #125

## v0.8.0 - 2024-02-04

Expand Down
3 changes: 3 additions & 0 deletions mtop/src/ui/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ fn memory_gauge<'a>(theme: &'a Theme, m: &'a StatsDelta, units: &'a UnitFormatte
.title_style(theme.title),
)
.gauge_style(theme.memory)
.use_unicode(true)
.label(label)
.ratio(ratio)
}
Expand All @@ -379,6 +380,7 @@ fn connections_gauge<'a>(theme: &'a Theme, m: &'a StatsDelta) -> Gauge<'a> {
.title_style(theme.title),
)
.gauge_style(theme.connections)
.use_unicode(true)
.label(label)
.ratio(ratio)
}
Expand All @@ -405,6 +407,7 @@ fn hits_gauge<'a>(theme: &'a Theme, m: &'a StatsDelta) -> Gauge<'a> {
.title_style(theme.title),
)
.gauge_style(theme.hits)
.use_unicode(true)
.label(label)
.ratio(ratio)
}
Expand Down

0 comments on commit d8af1fb

Please sign in to comment.