1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-15 13:32:35 +02:00

* Set reasonable minimum widths.

* Switch to a splitter layout in TomahawkWindow.
This commit is contained in:
Christian Muehlhaeuser 2010-10-26 07:23:02 +02:00
parent c1eb5bdc7f
commit a7dbcef462
3 changed files with 21 additions and 35 deletions

View File

@ -21,6 +21,8 @@ PlaylistManager::PlaylistManager( QObject* parent )
, m_currentMode( 0 )
, m_superCollectionVisible( true )
{
m_widget->setMinimumWidth( 600 );
m_superCollectionViews << new CollectionView();
m_superCollectionViews.first()->setModel( m_superCollectionFlatModel );
m_widget->addWidget( m_superCollectionViews.first() );

View File

@ -49,8 +49,6 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
#endif
ui->setupUi( this );
// ui->playlistView->connectProgressBar( ui->actionProgress );
// ui->playlistView->setFocus();
#ifndef Q_WS_MAC
ui->centralWidget->layout()->setContentsMargins( 4, 4, 4, 2 );
@ -60,7 +58,10 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
ui->sourceTreeView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
#endif
ui->mainLayout->addWidget( m_playlistManager->widget() );
delete ui->playlistWidget;
ui->splitter->addWidget( m_playlistManager->widget() );
ui->splitter->setStretchFactor( 0, 1 );
ui->splitter->setStretchFactor( 1, 3 );
QToolBar* toolbar = addToolBar( "TomahawkToolbar" );
toolbar->setObjectName( "TomahawkToolbar" );

View File

@ -14,39 +14,22 @@
<string>Tomahawk</string>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="SourceTreeView" name="sourceTreeView">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>250</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="mainLayout">
<property name="spacing">
<number>0</number>
</property>
</layout>
</item>
</layout>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="SourceTreeView" name="sourceTreeView">
<property name="minimumSize">
<size>
<width>250</width>
<height>0</height>
</size>
</property>
</widget>
<widget class="QWidget" name="playlistWidget" native="true"/>
</widget>
</item>
</layout>
</widget>