1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 03:10:12 +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_currentMode( 0 )
, m_superCollectionVisible( true ) , m_superCollectionVisible( true )
{ {
m_widget->setMinimumWidth( 600 );
m_superCollectionViews << new CollectionView(); m_superCollectionViews << new CollectionView();
m_superCollectionViews.first()->setModel( m_superCollectionFlatModel ); m_superCollectionViews.first()->setModel( m_superCollectionFlatModel );
m_widget->addWidget( m_superCollectionViews.first() ); m_widget->addWidget( m_superCollectionViews.first() );

View File

@@ -49,8 +49,6 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
#endif #endif
ui->setupUi( this ); ui->setupUi( this );
// ui->playlistView->connectProgressBar( ui->actionProgress );
// ui->playlistView->setFocus();
#ifndef Q_WS_MAC #ifndef Q_WS_MAC
ui->centralWidget->layout()->setContentsMargins( 4, 4, 4, 2 ); ui->centralWidget->layout()->setContentsMargins( 4, 4, 4, 2 );
@@ -60,7 +58,10 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
ui->sourceTreeView->setAttribute( Qt::WA_MacShowFocusRect, 0 ); ui->sourceTreeView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
#endif #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" ); QToolBar* toolbar = addToolBar( "TomahawkToolbar" );
toolbar->setObjectName( "TomahawkToolbar" ); toolbar->setObjectName( "TomahawkToolbar" );

View File

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