Changeset 8331


Ignore:
Timestamp:
May 4, 2009, 4:38:07 PM (12 years ago)
Author:
charles
Message:

(trunk qt) progressbar patch from kjg

Location:
trunk/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/torrent-delegate-min.cc

    r8329 r8331  
    115115    else cr = QPalette::Text;
    116116
     117    QStyle::State progressBarState( option.state );
     118    if( isPaused ) progressBarState = QStyle::State_None;
     119    progressBarState |= QStyle::State_Small;
     120
    117121    // layout
    118122    const QSize m( margin( *style ) );
     
    150154    myProgressBarStyle->palette = option.palette;
    151155    myProgressBarStyle->palette.setCurrentColorGroup( QPalette::Disabled );
    152     myProgressBarStyle->state = option.state | QStyle::State_Small;
     156    myProgressBarStyle->state = progressBarState;
    153157    myProgressBarStyle->progress = int(myProgressBarStyle->minimum + ((tor.percentDone() * (myProgressBarStyle->maximum - myProgressBarStyle->minimum))));
    154158    style->drawControl( QStyle::CE_ProgressBar, myProgressBarStyle, painter );
  • trunk/qt/torrent-delegate.cc

    r8329 r8331  
    333333    else cr = QPalette::Text;
    334334
     335    QStyle::State progressBarState( option.state );
     336    if( isPaused ) progressBarState = QStyle::State_None;
     337    progressBarState |= QStyle::State_Small;
     338
    335339    // layout
    336340    const QSize m( margin( *style ) );
     
    365369    myProgressBarStyle->palette = option.palette;
    366370    myProgressBarStyle->palette.setCurrentColorGroup( QPalette::Disabled );
    367     myProgressBarStyle->state = option.state | QStyle::State_Small;
     371    myProgressBarStyle->state = progressBarState;
    368372    myProgressBarStyle->progress = int(myProgressBarStyle->minimum + ((tor.percentDone() * (myProgressBarStyle->maximum - myProgressBarStyle->minimum))));
    369373    style->drawControl( QStyle::CE_ProgressBar, myProgressBarStyle, painter );
Note: See TracChangeset for help on using the changeset viewer.