From b1824c349e88d166aefed12e8b6cd40bbac7206d Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Thu, 30 Aug 2012 15:31:44 +0200 Subject: [PATCH] Draw a slightly smaller slider knob if not on Mac. Rationale: on QtCurve and Oxygen this looks really weird, and under a magnifier it's even more evident. The few pixels between the knob corners and widget corners tend to be slightly darker, and look a bit like drawing artifacts. Adding 1px of space and decreasing the rounding radius fixes this. --- src/widgets/SlideSwitchButton.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/widgets/SlideSwitchButton.cpp b/src/widgets/SlideSwitchButton.cpp index 39af6ce40..6754b2819 100644 --- a/src/widgets/SlideSwitchButton.cpp +++ b/src/widgets/SlideSwitchButton.cpp @@ -278,5 +278,9 @@ SlideSwitchButton::createKnob() p.setBrush( gradient ); p.setPen( QColor( 152, 152, 152 ) ); +#ifdef Q_OS_MAC p.drawRoundedRect( m_knob.rect(), 3, 3 ); +#else + p.drawRoundedRect( m_knob.rect().adjusted( 1, 1, -1, -1 ), 2, 2 ); +#endif }