1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-13 01:44:40 +00:00

(trunk qt) sync the Qt client's statusbar with the GTK+ client's wrt #3344 and #2793

This commit is contained in:
Charles Kerr 2010-06-25 21:04:33 +00:00
parent 98cec85e46
commit 4094dc2544
2 changed files with 17 additions and 19 deletions

View file

@ -438,8 +438,8 @@ QWidget *
TrMainWindow :: createStatusBar( )
{
QMenu * m;
QLabel *l, *l2;
QWidget *w;
QLabel * l;
QWidget * w;
QHBoxLayout * h;
QPushButton * p;
QActionGroup * a;
@ -500,27 +500,29 @@ TrMainWindow :: createStatusBar( )
l = myStatsLabel = new QLabel( this );
h->addWidget( l );
w = new QWidget( this );
w->setMinimumSize( HIG::PAD_BIG, 1 );
w->setMaximumSize( HIG::PAD_BIG, 1 );
h->addWidget( w );
l = new QLabel( this );
l->setPixmap( getStockIcon( "go-down", QStyle::SP_ArrowDown ).pixmap( smallIconSize ) );
h->addWidget( l );
l2 = myDownloadSpeedLabel = new QLabel( this );
h->addWidget( l2 );
myDownStatusWidgets << w << l << l2;
h->addSpacing( HIG::PAD_BIG );
w = new QWidget( this );
w->setMinimumSize( HIG::PAD_BIG, 1 );
w->setMaximumSize( HIG::PAD_BIG, 1 );
h->addWidget( w );
l = myDownloadSpeedLabel = new QLabel( this );
h->addWidget( l );
l = new QLabel( this );
l->setPixmap( getStockIcon( "go-down", QStyle::SP_ArrowDown ).pixmap( smallIconSize ) );
h->addWidget( l );
h->addSpacing( HIG::PAD_BIG );
w = new QWidget( this );
w->setMinimumSize( HIG::PAD_BIG, 1 );
w->setMaximumSize( HIG::PAD_BIG, 1 );
h->addWidget( w );
l = myUploadSpeedLabel = new QLabel;
h->addWidget( l );
l = new QLabel;
l->setPixmap( getStockIcon( "go-up", QStyle::SP_ArrowUp ).pixmap( smallIconSize ) );
h->addWidget( l );
l2 = myUploadSpeedLabel = new QLabel;
h->addWidget( l2 );
myUpStatusWidgets << w << l << l2;
return top;
}
@ -733,8 +735,6 @@ TrMainWindow :: refreshStatusBar( )
const Speed down( myModel.getDownloadSpeed( ) );
myUploadSpeedLabel->setText( Utils :: speedToString( up ) );
myDownloadSpeedLabel->setText( Utils :: speedToString( down ) );
foreach( QWidget * w, myUpStatusWidgets ) w->setVisible( !up.isZero( ) );
foreach( QWidget * w, myDownStatusWidgets ) w->setVisible( !down.isZero( ) );
myNetworkLabel->setVisible( !mySession.isServer( ) );

View file

@ -158,8 +158,6 @@ class TrMainWindow: public QMainWindow
QMenu * createOptionsMenu( void );
QWidget * createStatusBar( void );
QWidget * myStatusBar;
QWidgetList myUpStatusWidgets;
QWidgetList myDownStatusWidgets;
QPushButton * myAltSpeedButton;
QPushButton * myOptionsButton;
QLabel * myVisibleCountLabel;