mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 20:00:13 +02:00
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.
This commit is contained in:
@@ -278,5 +278,9 @@ SlideSwitchButton::createKnob()
|
|||||||
p.setBrush( gradient );
|
p.setBrush( gradient );
|
||||||
p.setPen( QColor( 152, 152, 152 ) );
|
p.setPen( QColor( 152, 152, 152 ) );
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
p.drawRoundedRect( m_knob.rect(), 3, 3 );
|
p.drawRoundedRect( m_knob.rect(), 3, 3 );
|
||||||
|
#else
|
||||||
|
p.drawRoundedRect( m_knob.rect().adjusted( 1, 1, -1, -1 ), 2, 2 );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user