From 93e22693b1fc378c87dd6bf749ac530c19dbc3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sun, 16 Apr 2017 18:34:54 +0200 Subject: Fix bug of ScrollBar where the bar was not shown. --- plugingui/scrollbar.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugingui/scrollbar.cc') diff --git a/plugingui/scrollbar.cc b/plugingui/scrollbar.cc index 32db4a4..d7edd8f 100644 --- a/plugingui/scrollbar.cc +++ b/plugingui/scrollbar.cc @@ -135,7 +135,7 @@ void ScrollBar::repaintEvent(RepaintEvent* repaintEvent) int offset = width() + 2; int y_val1 = (currentValue * h) / maxValue; - int y_val2 = ((currentValue + rangeValue) * h) / maxValue; + int y_val2 = ((currentValue + rangeValue) * h) / maxValue - 1; p.drawFilledRectangle(2, y_val1 + offset, width() - 1, y_val2 + offset); } -- cgit v1.2.3