From 2aeb2c9cf4da7ded3f68c046f6fa2773dded44a8 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 29 Nov 2015 21:28:49 +0100 Subject: Always draw VerticalLine 2 pixels high and centered in the height of the widget. --- plugingui/verticalline.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'plugingui') diff --git a/plugingui/verticalline.cc b/plugingui/verticalline.cc index 31c14d4..5bf4afd 100644 --- a/plugingui/verticalline.cc +++ b/plugingui/verticalline.cc @@ -38,8 +38,14 @@ VerticalLine::VerticalLine(Widget *parent) void VerticalLine::repaintEvent(RepaintEvent* repaintEvent) { + if(height() < 2) + { + return; + } + Painter p(*this); - p.drawImageStretched(0, 0, vline, width(), height()); + p.drawImageStretched(0, (height() - vline.height()) / 2, + vline, width(), vline.height()); } } // GUI:: -- cgit v1.2.3