Changeset 11056
- Timestamp:
- Jul 25, 2010, 10:14:13 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt/torrent-delegate-min.cc
r11043 r11056 23 23 #include <QPixmapCache> 24 24 #include <QStyleOptionProgressBarV2> 25 26 #include <libtransmission/transmission.h> 27 #include <libtransmission/utils.h> 25 28 26 29 #include "torrent.h" … … 134 137 BAR_HEIGHT ); 135 138 const QRect statusArea( barArea.x( ) - GUI_PAD - statusSize.width( ), 136 fillArea.y( ) ,139 fillArea.y( ) + ( fillArea.height( ) - statusSize.height( ) ) / 2, 137 140 fillArea.width( ), 138 141 fillArea.height( ) ); … … 157 160 myProgressBarStyle->palette.setCurrentColorGroup( cg ); 158 161 myProgressBarStyle->state = progressBarState; 162 char buf[32]; 163 tr_snprintf( buf, sizeof( buf ), "%d%%", (int)tr_truncd( 100.0 * tor.percentDone( ), 0 ) ); 164 myProgressBarStyle->text = buf; 165 myProgressBarStyle->textVisible = true; 159 166 myProgressBarStyle->progress = int(myProgressBarStyle->minimum + (((isMagnet ? tor.metadataPercentDone() : tor.percentDone()) * (myProgressBarStyle->maximum - myProgressBarStyle->minimum)))); 160 167 style->drawControl( QStyle::CE_ProgressBar, myProgressBarStyle, painter );
Note: See TracChangeset
for help on using the changeset viewer.