mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
Draw SocialWidget, STPD and AccountsWidget the same way.
This commit is contained in:
@@ -41,11 +41,11 @@ SocialWidget::SocialWidget( QWidget* parent )
|
|||||||
, m_parentRect( parent->rect() )
|
, m_parentRect( parent->rect() )
|
||||||
{
|
{
|
||||||
ui->setupUi( this );
|
ui->setupUi( this );
|
||||||
#ifndef Q_OS_WIN
|
setWindowFlags( Qt::Popup | Qt::FramelessWindowHint );
|
||||||
setWindowFlags( Qt::FramelessWindowHint ); //this causes ugly black shadows on Windows
|
|
||||||
setWindowFlags( Qt::Popup );
|
setAutoFillBackground( false );
|
||||||
#endif
|
|
||||||
setAttribute( Qt::WA_TranslucentBackground, true );
|
setAttribute( Qt::WA_TranslucentBackground, true );
|
||||||
|
setAttribute( Qt::WA_NoSystemBackground, true );
|
||||||
|
|
||||||
TomahawkUtils::unmarginLayout( layout() );
|
TomahawkUtils::unmarginLayout( layout() );
|
||||||
|
|
||||||
@@ -149,20 +149,11 @@ SocialWidget::paintEvent( QPaintEvent* event )
|
|||||||
outline.lineTo( r.right() - ARROW_HEIGHT * 3, r.bottom()+1 + ARROW_HEIGHT );
|
outline.lineTo( r.right() - ARROW_HEIGHT * 3, r.bottom()+1 + ARROW_HEIGHT );
|
||||||
outline.lineTo( r.right() - ARROW_HEIGHT * 4, r.bottom()+1 );
|
outline.lineTo( r.right() - ARROW_HEIGHT * 4, r.bottom()+1 );
|
||||||
|
|
||||||
QPainter p( this );
|
TomahawkUtils::drawCompositedPopup( this,
|
||||||
p.setRenderHint( QPainter::Antialiasing );
|
outline,
|
||||||
p.setBackgroundMode( Qt::TransparentMode );
|
TomahawkUtils::Colors::BORDER_LINE,
|
||||||
|
TomahawkUtils::Colors::POPUP_BACKGROUND,
|
||||||
QPen pen( TomahawkUtils::Colors::BORDER_LINE );
|
TomahawkUtils::POPUP_OPACITY );
|
||||||
pen.setWidth( 2 );
|
|
||||||
p.setPen( pen );
|
|
||||||
p.drawPath( outline );
|
|
||||||
|
|
||||||
p.setOpacity( TomahawkUtils::POPUP_OPACITY );
|
|
||||||
p.fillPath( outline, TomahawkUtils::Colors::POPUP_BACKGROUND );
|
|
||||||
|
|
||||||
QWidget::paintEvent( event );
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -49,13 +49,11 @@ SourceTreePopupDialog::SourceTreePopupDialog()
|
|||||||
#ifndef ENABLE_HEADLESS
|
#ifndef ENABLE_HEADLESS
|
||||||
setParent( QApplication::activeWindow() );
|
setParent( QApplication::activeWindow() );
|
||||||
#endif
|
#endif
|
||||||
#ifndef Q_OS_WIN
|
setWindowFlags( Qt::Popup | Qt::FramelessWindowHint );
|
||||||
setWindowFlags( Qt::FramelessWindowHint );
|
|
||||||
setWindowFlags( Qt::Popup );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
setAutoFillBackground( false );
|
setAutoFillBackground( false );
|
||||||
setAttribute( Qt::WA_TranslucentBackground, true );
|
setAttribute( Qt::WA_TranslucentBackground, true );
|
||||||
|
setAttribute( Qt::WA_NoSystemBackground, true );
|
||||||
|
|
||||||
//setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
|
//setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user