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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0x/qt/mainwin.cc

    r10770 r10860  
    440440{
    441441    QMenu * m;
    442     QLabel *l, *l2;
    443     QWidget *w;
     442    QLabel * l;
     443    QWidget * w;
    444444    QHBoxLayout * h;
    445445    QPushButton * p;
     
    502502        h->addWidget( l );
    503503
     504    h->addSpacing( HIG::PAD_BIG );
     505
    504506        w = new QWidget( this );
    505507        w->setMinimumSize( HIG::PAD_BIG, 1 );
    506508        w->setMaximumSize( HIG::PAD_BIG, 1 );
    507509        h->addWidget( w );
     510        l = myDownloadSpeedLabel = new QLabel( this );
     511        h->addWidget( l );
    508512        l = new QLabel( this );
    509513        l->setPixmap( getStockIcon( "go-down", QStyle::SP_ArrowDown ).pixmap( smallIconSize ) );
    510514        h->addWidget( l );
    511         l2 = myDownloadSpeedLabel = new QLabel( this );
    512         h->addWidget( l2 );
    513         myDownStatusWidgets << w << l << l2;
     515
     516    h->addSpacing( HIG::PAD_BIG );
    514517
    515518        w = new QWidget( this );
     
    517520        w->setMaximumSize( HIG::PAD_BIG, 1 );
    518521        h->addWidget( w );
     522        l = myUploadSpeedLabel = new QLabel;
     523        h->addWidget( l );
    519524        l = new QLabel;
    520525        l->setPixmap( getStockIcon( "go-up", QStyle::SP_ArrowUp ).pixmap( smallIconSize ) );
    521526        h->addWidget( l );
    522         l2 = myUploadSpeedLabel = new QLabel;
    523         h->addWidget( l2 );
    524         myUpStatusWidgets << w << l << l2;
    525527
    526528    return top;
     
    735737    myUploadSpeedLabel->setText( Utils :: speedToString( up ) );
    736738    myDownloadSpeedLabel->setText( Utils :: speedToString( down ) );
    737     foreach( QWidget * w, myUpStatusWidgets ) w->setVisible( !up.isZero( ) );
    738     foreach( QWidget * w, myDownStatusWidgets ) w->setVisible( !down.isZero( ) );
    739739
    740740    myNetworkLabel->setVisible( !mySession.isServer( ) );
Note: See TracChangeset for help on using the changeset viewer.