1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 21:57:41 +02: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 ); m_trackView->proxyModel()->setStyle( PlayableProxyModel::Fancy );
TomahawkStyle::styleScrollBar( m_trackView->verticalScrollBar() ); TomahawkStyle::styleScrollBar( m_trackView->verticalScrollBar() );
setLayout( new QVBoxLayout( this ) ); setLayout( new QVBoxLayout() );
TomahawkUtils::unmarginLayout( layout() ); TomahawkUtils::unmarginLayout( layout() );
m_trackView->setStyleSheet( QString( "QTreeView { background-color: white; }" ) ); m_trackView->setStyleSheet( QString( "QTreeView { background-color: white; }" ) );
@@ -63,7 +63,7 @@ ContextView::ContextView( QWidget* parent, const QString& caption )
vbox->setPalette( pal ); vbox->setPalette( pal );
vbox->setAutoFillBackground( true ); vbox->setAutoFillBackground( true );
QVBoxLayout* vboxl = new QVBoxLayout( this ); QVBoxLayout* vboxl = new QVBoxLayout();
TomahawkUtils::unmarginLayout( vboxl ); TomahawkUtils::unmarginLayout( vboxl );
vboxl->setContentsMargins( 32, 32, 32, 32 ); vboxl->setContentsMargins( 32, 32, 32, 32 );
vboxl->setSpacing( 32 ); vboxl->setSpacing( 32 );
@@ -71,11 +71,11 @@ ContextView::ContextView( QWidget* parent, const QString& caption )
vbox->setLayout( vboxl ); vbox->setLayout( vboxl );
QWidget* hbox = new QWidget; QWidget* hbox = new QWidget;
QHBoxLayout* hboxl = new QHBoxLayout( this ); QHBoxLayout* hboxl = new QHBoxLayout();
TomahawkUtils::unmarginLayout( hboxl ); TomahawkUtils::unmarginLayout( hboxl );
hboxl->setSpacing( 32 ); hboxl->setSpacing( 32 );
m_innerLayout = new QVBoxLayout( this ); m_innerLayout = new QVBoxLayout();
TomahawkUtils::unmarginLayout( m_innerLayout ); TomahawkUtils::unmarginLayout( m_innerLayout );
m_innerLayout->addWidget( m_trackView, 1 ); m_innerLayout->addWidget( m_trackView, 1 );
m_innerLayout->addStretch(); m_innerLayout->addStretch();