diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-11-29 21:28:49 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-11-29 21:28:49 +0100 |
commit | 2aeb2c9cf4da7ded3f68c046f6fa2773dded44a8 (patch) | |
tree | a8d590d514f896f2b5c00f911ff2eaaf1e85dc1e /plugingui/verticalline.cc | |
parent | e4088c3bbfd71f1a9f4ae7344bd5c43202b2ed3e (diff) |
Always draw VerticalLine 2 pixels high and centered in the height of the widget.
Diffstat (limited to 'plugingui/verticalline.cc')
-rw-r--r-- | plugingui/verticalline.cc | 8 |
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:: |