mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-28 11:42:42 +01:00
Draw SocialWidget, STPD and AccountsWidget the same way.
This commit is contained in:
parent
7c462f8ff0
commit
47439baa37
@ -41,11 +41,11 @@ SocialWidget::SocialWidget( QWidget* parent )
|
||||
, m_parentRect( parent->rect() )
|
||||
{
|
||||
ui->setupUi( this );
|
||||
#ifndef Q_OS_WIN
|
||||
setWindowFlags( Qt::FramelessWindowHint ); //this causes ugly black shadows on Windows
|
||||
setWindowFlags( Qt::Popup );
|
||||
#endif
|
||||
setWindowFlags( Qt::Popup | Qt::FramelessWindowHint );
|
||||
|
||||
setAutoFillBackground( false );
|
||||
setAttribute( Qt::WA_TranslucentBackground, true );
|
||||
setAttribute( Qt::WA_NoSystemBackground, true );
|
||||
|
||||
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 * 4, r.bottom()+1 );
|
||||
|
||||
QPainter p( this );
|
||||
p.setRenderHint( QPainter::Antialiasing );
|
||||
p.setBackgroundMode( Qt::TransparentMode );
|
||||
|
||||
QPen pen( TomahawkUtils::Colors::BORDER_LINE );
|
||||
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;
|
||||
TomahawkUtils::drawCompositedPopup( this,
|
||||
outline,
|
||||
TomahawkUtils::Colors::BORDER_LINE,
|
||||
TomahawkUtils::Colors::POPUP_BACKGROUND,
|
||||
TomahawkUtils::POPUP_OPACITY );
|
||||
}
|
||||
|
||||
|
||||
|
@ -49,13 +49,11 @@ SourceTreePopupDialog::SourceTreePopupDialog()
|
||||
#ifndef ENABLE_HEADLESS
|
||||
setParent( QApplication::activeWindow() );
|
||||
#endif
|
||||
#ifndef Q_OS_WIN
|
||||
setWindowFlags( Qt::FramelessWindowHint );
|
||||
setWindowFlags( Qt::Popup );
|
||||
#endif
|
||||
setWindowFlags( Qt::Popup | Qt::FramelessWindowHint );
|
||||
|
||||
setAutoFillBackground( false );
|
||||
setAttribute( Qt::WA_TranslucentBackground, true );
|
||||
setAttribute( Qt::WA_NoSystemBackground, true );
|
||||
|
||||
//setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user