mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 17:43:59 +02:00
Fix AccountsPopupWidget appearance on Windows.
This commit is contained in:
@@ -60,7 +60,13 @@ AccountsPopupWidget::setWidget( QWidget* widget )
|
|||||||
void
|
void
|
||||||
AccountsPopupWidget::anchorAt( const QPoint &p )
|
AccountsPopupWidget::anchorAt( const QPoint &p )
|
||||||
{
|
{
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
// We do this because Windows sticks the toolbutton really close to the
|
||||||
|
// right side border of the window
|
||||||
|
QPoint myTopRight( p.x() - sizeHint().width(), p.y() );
|
||||||
|
#else
|
||||||
QPoint myTopRight( p.x() - sizeHint().width() + 8, p.y() );
|
QPoint myTopRight( p.x() - sizeHint().width() + 8, p.y() );
|
||||||
|
#endif
|
||||||
move( myTopRight );
|
move( myTopRight );
|
||||||
if( isVisible() )
|
if( isVisible() )
|
||||||
repaint();
|
repaint();
|
||||||
@@ -79,6 +85,7 @@ void AccountsPopupWidget::paintEvent( QPaintEvent* )
|
|||||||
QPainter p( this );
|
QPainter p( this );
|
||||||
|
|
||||||
p.setRenderHint( QPainter::Antialiasing );
|
p.setRenderHint( QPainter::Antialiasing );
|
||||||
|
p.setBackgroundMode( Qt::TransparentMode );
|
||||||
|
|
||||||
QPen pen( QColor( 0x8c, 0x8c, 0x8c ) );
|
QPen pen( QColor( 0x8c, 0x8c, 0x8c ) );
|
||||||
pen.setWidth( 2 );
|
pen.setWidth( 2 );
|
||||||
|
Reference in New Issue
Block a user