summaryrefslogtreecommitdiff
path: root/plugingui/verticalline.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/verticalline.cc')
-rw-r--r--plugingui/verticalline.cc8
1 files changed, 7 insertions, 1 deletions
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::