From 22fa9a000320e86aae55f58444f19d58a4feec6a Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Sun, 19 Aug 2012 18:42:58 +0200 Subject: [PATCH] Fix AccountsPopupWidget appearance on Windows. --- src/widgets/AccountsPopupWidget.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/widgets/AccountsPopupWidget.cpp b/src/widgets/AccountsPopupWidget.cpp index 821f8c250..a39ac28e9 100644 --- a/src/widgets/AccountsPopupWidget.cpp +++ b/src/widgets/AccountsPopupWidget.cpp @@ -60,7 +60,13 @@ AccountsPopupWidget::setWidget( QWidget* widget ) void 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() ); +#endif move( myTopRight ); if( isVisible() ) repaint(); @@ -79,6 +85,7 @@ void AccountsPopupWidget::paintEvent( QPaintEvent* ) QPainter p( this ); p.setRenderHint( QPainter::Antialiasing ); + p.setBackgroundMode( Qt::TransparentMode ); QPen pen( QColor( 0x8c, 0x8c, 0x8c ) ); pen.setWidth( 2 );