From 62e3523d2903947982fcc34f1d609030bb5bfa6d Mon Sep 17 00:00:00 2001 From: Indradhanush Gupta Date: Mon, 16 Mar 2020 20:23:15 +0530 Subject: [PATCH] modules/exchangerate: Display exchange rate for one unit of base currency --- modules/exchangerates/widget.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/exchangerates/widget.go b/modules/exchangerates/widget.go index bf2f2404..c638d787 100644 --- a/modules/exchangerates/widget.go +++ b/modules/exchangerates/widget.go @@ -56,11 +56,11 @@ func (widget *Widget) content() (string, string, bool) { out = widget.err.Error() } else { for base, rates := range widget.settings.rates { - out += fmt.Sprintf("[%s]Rates from %s[white]\n", widget.settings.common.Colors.Subheading, base) + out += fmt.Sprintf("[%s]1 %s[white] = ", widget.settings.common.Colors.Subheading, base) idx := 0 for _, cur := range rates { rate := widget.rates[base][cur] - out += fmt.Sprintf("[%s]%s - %f[white]\n", widget.CommonSettings().RowColor(idx), cur, rate) + out += fmt.Sprintf("[%s]%f %s[white]\n", widget.CommonSettings().RowColor(idx), rate, cur) idx++ } }