From 040e29dfb97a2f7f6befa65c1a5dbc00cc4b2c65 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Thu, 9 Aug 2018 18:45:18 +0300 Subject: [PATCH] Add bottom border line on Linux --- src/TopRoomBar.h | 4 +++- src/UserInfoWidget.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/TopRoomBar.h b/src/TopRoomBar.h index 994486e0..ad74458c 100644 --- a/src/TopRoomBar.h +++ b/src/TopRoomBar.h @@ -78,8 +78,10 @@ protected: QPainter p(this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); +#if !defined(Q_OS_MAC) p.setPen(QPen(borderColor())); - p.drawLine(QPointF(0, height()), QPointF(width(), height())); + p.drawLine(QPointF(0, height() - p.pen().width()), QPointF(width(), height())); +#endif } private: diff --git a/src/UserInfoWidget.cpp b/src/UserInfoWidget.cpp index b2860028..c0409823 100644 --- a/src/UserInfoWidget.cpp +++ b/src/UserInfoWidget.cpp @@ -161,6 +161,8 @@ UserInfoWidget::paintEvent(QPaintEvent *event) QPainter p(this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); +#if !defined(Q_OS_MAC) p.setPen(QPen(borderColor())); - p.drawLine(QPointF(0, height()), QPointF(width(), height())); + p.drawLine(QPointF(0, height() - p.pen().width()), QPointF(width(), height())); +#endif }