From dff87c2d93d53d5a8f4f128bfbd57754dc356928 Mon Sep 17 00:00:00 2001 From: Pavel Artsishevsky Date: Thu, 29 Dec 2022 20:00:52 +0300 Subject: [PATCH] Make border between window and decorations thinner Signed-off-by: Pavel Artsishevsky --- src/decoration/qgnomeplatformdecoration.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/decoration/qgnomeplatformdecoration.cpp b/src/decoration/qgnomeplatformdecoration.cpp index ae75d15..bb32acf 100644 --- a/src/decoration/qgnomeplatformdecoration.cpp +++ b/src/decoration/qgnomeplatformdecoration.cpp @@ -67,6 +67,7 @@ #define SHADOWS_WIDTH 10 #define TITLEBAR_HEIGHT 37 #define WINDOW_BORDER_WIDTH 1 +#define TITLEBAR_SEPARATOR_SIZE 0.5 Q_DECL_IMPORT void qt_blurImage(QPainter *p, QImage &blurImage, qreal radius, bool quality, bool alphaOnly, int transposed = 0); @@ -449,7 +450,10 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device) // ******************************** p.save(); p.setPen(borderColor); - p.drawLine(margins().left(), margins().top() - WINDOW_BORDER_WIDTH, surfaceRect.width() - margins().right(), margins().top() - WINDOW_BORDER_WIDTH); + p.drawLine(QLineF(margins().left(), + margins().top() - TITLEBAR_SEPARATOR_SIZE, + surfaceRect.width() - margins().right(), + margins().top() - TITLEBAR_SEPARATOR_SIZE)); p.restore(); // Window title