summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-11-29 21:28:49 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2015-11-29 21:28:49 +0100
commit2aeb2c9cf4da7ded3f68c046f6fa2773dded44a8 (patch)
treea8d590d514f896f2b5c00f911ff2eaaf1e85dc1e
parente4088c3bbfd71f1a9f4ae7344bd5c43202b2ed3e (diff)
Always draw VerticalLine 2 pixels high and centered in the height of the widget.
-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::