From 0f9e1d0aa0101e0b3be0453c4079a3c46f2e7847 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 6 Aug 2010 05:57:41 +0000 Subject: [PATCH] (trunk qt) when the main window is resized to be narrow, use the layout space more wisely in the statusbar --- qt/mainwin.cc | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/qt/mainwin.cc b/qt/mainwin.cc index 8c9359fa5..7e7b956dc 100644 --- a/qt/mainwin.cc +++ b/qt/mainwin.cc @@ -352,7 +352,6 @@ TrMainWindow :: createStatusBar( ) { QMenu * m; QLabel * l; - QWidget * w; QHBoxLayout * h; QPushButton * p; QActionGroup * a; @@ -413,12 +412,8 @@ TrMainWindow :: createStatusBar( ) l = myStatsLabel = new QLabel( this ); h->addWidget( l ); - h->addSpacing( HIG::PAD_BIG ); + h->addStretch( 1 ); - w = new QWidget( this ); - w->setMinimumSize( HIG::PAD_BIG, 1 ); - w->setMaximumSize( HIG::PAD_BIG, 1 ); - h->addWidget( w ); l = myDownloadSpeedLabel = new QLabel( this ); const int minimumSpeedWidth = l->fontMetrics().width( Formatter::speedToString(Speed::fromKBps(999.99))); l->setMinimumWidth( minimumSpeedWidth ); @@ -428,12 +423,8 @@ TrMainWindow :: createStatusBar( ) l->setPixmap( getStockIcon( "go-down", QStyle::SP_ArrowDown ).pixmap( smallIconSize ) ); h->addWidget( l ); - h->addSpacing( HIG::PAD_BIG ); + h->addStretch( 1 ); - w = new QWidget( this ); - w->setMinimumSize( HIG::PAD_BIG, 1 ); - w->setMaximumSize( HIG::PAD_BIG, 1 ); - h->addWidget( w ); l = myUploadSpeedLabel = new QLabel; l->setMinimumWidth( minimumSpeedWidth ); l->setAlignment( Qt::AlignRight|Qt::AlignVCenter );