From 44be0ec7bd1306cf3f245d33d101d458f9d53486 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 10 Nov 2013 19:06:46 +0000 Subject: Corrected a resize issue with reputation bars of the listview scrollbar appears. --- src/client/reputationwindow.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/reputationwindow.cc b/src/client/reputationwindow.cc index 3566458..08cbb19 100644 --- a/src/client/reputationwindow.cc +++ b/src/client/reputationwindow.cc @@ -38,7 +38,17 @@ public: bar_reputation = reputation; } -protected: +protected: + + virtual void resize() + { + if (parent()) { + // small hack to keep the bars aligned within the listviewitem if the listview scrollbar appears/dissapears + const float padding = ui::root()->font_large()->height(); + set_width(parent()->width() - padding); + } + } + virtual void draw() { const float box_padding = 4.0f; -- cgit v1.2.3