From bec264c34bc5c40d40aef19c2bae40d1989ed521 Mon Sep 17 00:00:00 2001
From: Daniel Karbach <daniel.karbach@localhorst.tv>
Date: Tue, 21 Nov 2017 21:53:57 +0100
Subject: [PATCH] fix meter display

oops
---
 src/ui/widgets.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/ui/widgets.cpp b/src/ui/widgets.cpp
index 6ce92db..49fdb69 100644
--- a/src/ui/widgets.cpp
+++ b/src/ui/widgets.cpp
@@ -110,10 +110,12 @@ void Meter::Draw(app::Assets &assets, graphics::Viewport &viewport) noexcept {
 	}
 
 	if (value > 0.0f) {
+		glm::vec2 bottom_right = Position() + fullsize - glm::vec2(border) - padding;
+		bottom_right.x -= size.x * (1.0f - value);
 		assets.shaders.canvas.SetColor(fill_color);
 		assets.shaders.canvas.FillRect(
 			Position() + glm::vec2(border) + padding,
-			Position() + fullsize - glm::vec2(border) - padding
+			bottom_right
 		);
 	}
 }
-- 
2.39.5