From d8af1fbbfa37b69e17fb2a068f34beba628d9b3b Mon Sep 17 00:00:00 2001 From: Nick Pillitteri Date: Sun, 11 Feb 2024 15:12:08 -0500 Subject: [PATCH] Use unicode for finer grained gauges --- CHANGELOG.md | 2 ++ mtop/src/ui/core.rs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81ce7b4..9f8d466 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/mtop/src/ui/core.rs b/mtop/src/ui/core.rs index 4e4634c..292197c 100644 --- a/mtop/src/ui/core.rs +++ b/mtop/src/ui/core.rs @@ -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) } @@ -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) } @@ -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) }