Changeset 10859


Ignore:
Timestamp:
Jun 25, 2010, 9:04:33 PM (12 years ago)
Author:
charles
Message:

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

Location:
trunk/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/mainwin.cc

    r10795 r10859  
    439439{
    440440    QMenu * m;
    441     QLabel *l, *l2;
    442     QWidget *w;
     441    QLabel * l;
     442    QWidget * w;
    443443    QHBoxLayout * h;
    444444    QPushButton * p;
     
    501501        h->addWidget( l );
    502502
     503    h->addSpacing( HIG::PAD_BIG );
     504
    503505        w = new QWidget( this );
    504506        w->setMinimumSize( HIG::PAD_BIG, 1 );
    505507        w->setMaximumSize( HIG::PAD_BIG, 1 );
    506508        h->addWidget( w );
     509        l = myDownloadSpeedLabel = new QLabel( this );
     510        h->addWidget( l );
    507511        l = new QLabel( this );
    508512        l->setPixmap( getStockIcon( "go-down", QStyle::SP_ArrowDown ).pixmap( smallIconSize ) );
    509513        h->addWidget( l );
    510         l2 = myDownloadSpeedLabel = new QLabel( this );
    511         h->addWidget( l2 );
    512         myDownStatusWidgets << w << l << l2;
     514
     515    h->addSpacing( HIG::PAD_BIG );
    513516
    514517        w = new QWidget( this );
     
    516519        w->setMaximumSize( HIG::PAD_BIG, 1 );
    517520        h->addWidget( w );
     521        l = myUploadSpeedLabel = new QLabel;
     522        h->addWidget( l );
    518523        l = new QLabel;
    519524        l->setPixmap( getStockIcon( "go-up", QStyle::SP_ArrowUp ).pixmap( smallIconSize ) );
    520525        h->addWidget( l );
    521         l2 = myUploadSpeedLabel = new QLabel;
    522         h->addWidget( l2 );
    523         myUpStatusWidgets << w << l << l2;
    524526
    525527    return top;
     
    734736    myUploadSpeedLabel->setText( Utils :: speedToString( up ) );
    735737    myDownloadSpeedLabel->setText( Utils :: speedToString( down ) );
    736     foreach( QWidget * w, myUpStatusWidgets ) w->setVisible( !up.isZero( ) );
    737     foreach( QWidget * w, myDownStatusWidgets ) w->setVisible( !down.isZero( ) );
    738738
    739739    myNetworkLabel->setVisible( !mySession.isServer( ) );
  • trunk/qt/mainwin.h

    r10790 r10859  
    159159        QWidget * createStatusBar( void );
    160160        QWidget * myStatusBar;
    161         QWidgetList myUpStatusWidgets;
    162         QWidgetList myDownStatusWidgets;
    163161        QPushButton * myAltSpeedButton;
    164162        QPushButton * myOptionsButton;
Note: See TracChangeset for help on using the changeset viewer.