1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-01-17 14:28:24 +01:00

Don't pass parent widget in constructor. We call setLayout later.

This commit is contained in:
Christian Muehlhaeuser 2014-10-20 04:43:18 +02:00
parent 906285e442
commit ea18ab891f

View File

@ -50,7 +50,7 @@ ContextView::ContextView( QWidget* parent, const QString& caption )
m_trackView->proxyModel()->setStyle( PlayableProxyModel::Fancy );
TomahawkStyle::styleScrollBar( m_trackView->verticalScrollBar() );
setLayout( new QVBoxLayout( this ) );
setLayout( new QVBoxLayout() );
TomahawkUtils::unmarginLayout( layout() );
m_trackView->setStyleSheet( QString( "QTreeView { background-color: white; }" ) );
@ -63,7 +63,7 @@ ContextView::ContextView( QWidget* parent, const QString& caption )
vbox->setPalette( pal );
vbox->setAutoFillBackground( true );
QVBoxLayout* vboxl = new QVBoxLayout( this );
QVBoxLayout* vboxl = new QVBoxLayout();
TomahawkUtils::unmarginLayout( vboxl );
vboxl->setContentsMargins( 32, 32, 32, 32 );
vboxl->setSpacing( 32 );
@ -71,11 +71,11 @@ ContextView::ContextView( QWidget* parent, const QString& caption )
vbox->setLayout( vboxl );
QWidget* hbox = new QWidget;
QHBoxLayout* hboxl = new QHBoxLayout( this );
QHBoxLayout* hboxl = new QHBoxLayout();
TomahawkUtils::unmarginLayout( hboxl );
hboxl->setSpacing( 32 );
m_innerLayout = new QVBoxLayout( this );
m_innerLayout = new QVBoxLayout();
TomahawkUtils::unmarginLayout( m_innerLayout );
m_innerLayout->addWidget( m_trackView, 1 );
m_innerLayout->addStretch();