From cf45a5d02b09120fc2e8e9ebaaaa5bdd45a021e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Sat, 21 Aug 2021 20:21:21 +0200 Subject: [PATCH] MemorySwapMeter: use full width on odd total width --- MemorySwapMeter.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/MemorySwapMeter.c b/MemorySwapMeter.c index ba5032c9..3371133c 100644 --- a/MemorySwapMeter.c +++ b/MemorySwapMeter.c @@ -33,12 +33,10 @@ static void MemorySwapMeter_updateValues(Meter* this) { static void MemorySwapMeter_draw(Meter* this, int x, int y, int w) { MemorySwapMeterData* data = this->meterData; - int colwidth = (w - 2) / 2 + 1; - assert(data->memoryMeter->draw); - data->memoryMeter->draw(data->memoryMeter, x, y, colwidth); + data->memoryMeter->draw(data->memoryMeter, x, y, w / 2); assert(data->swapMeter->draw); - data->swapMeter->draw(data->swapMeter, x + w / 2, y, colwidth); + data->swapMeter->draw(data->swapMeter, x + w / 2, y, w - w / 2); } static void MemorySwapMeter_init(Meter* this) {