From 339e9a3869ada7741d4e01815fc6905c1b7298f9 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Wed, 13 Jun 2012 09:15:55 +0200 Subject: [PATCH] TWK-579: Always set stretch factor to avoid super wide default widths --- src/TomahawkWindow.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/TomahawkWindow.cpp b/src/TomahawkWindow.cpp index 1a7734404..83db1ba4e 100644 --- a/src/TomahawkWindow.cpp +++ b/src/TomahawkWindow.cpp @@ -160,11 +160,12 @@ TomahawkWindow::loadSettings() restoreState( s->mainWindowState() ); if ( !s->mainWindowSplitterState().isEmpty() ) ui->splitter->restoreState( s->mainWindowSplitterState() ); - else - { - ui->splitter->setStretchFactor( 0, 0 ); - ui->splitter->setStretchFactor( 1, 1 ); - } + + // Always set stretch factor. If user hasn't manually set splitter sizes, + // this will ensure a sane default on all startups. If the user has, the manual + // size will override the default stretching + ui->splitter->setStretchFactor( 0, 0 ); + ui->splitter->setStretchFactor( 1, 1 ); #ifdef QT_MAC_USE_COCOA if ( workaround )