(trunk qt) progressbar state/small improvements from kjg

This commit is contained in:
Charles Kerr 2009-05-04 04:04:43 +00:00
parent 7928221537
commit 363da76680
3 changed files with 4 additions and 4 deletions

View File

@ -533,7 +533,7 @@ FileTreeDelegate :: paint( QPainter * painter,
else if( column == COL_PROGRESS )
{
QStyleOptionProgressBar p;
p.state = QStyle::State_Enabled;
p.state = option.state | QStyle::State_Small;
p.direction = QApplication::layoutDirection();
p.rect = option.rect;
p.rect.setSize( QSize( option.rect.width()-2, option.rect.height()-2 ) );
@ -550,7 +550,7 @@ FileTreeDelegate :: paint( QPainter * painter,
else if( column == COL_WANTED )
{
QStyleOptionButton o;
o.state = QStyle::State_Enabled;
o.state = option.state;
o.direction = QApplication::layoutDirection();
o.rect.setSize( QSize( 20, option.rect.height( ) ) );
o.rect.moveCenter( option.rect.center( ) );

View File

@ -149,7 +149,7 @@ TorrentDelegateMin :: drawTorrent( QPainter * painter, const QStyleOptionViewIte
myProgressBarStyle->direction = option.direction;
myProgressBarStyle->palette = option.palette;
myProgressBarStyle->palette.setCurrentColorGroup( QPalette::Disabled );
myProgressBarStyle->state = QStyle::State_Off;
myProgressBarStyle->state = option.state | QStyle::State_Small;
myProgressBarStyle->progress = int(myProgressBarStyle->minimum + ((tor.percentDone() * (myProgressBarStyle->maximum - myProgressBarStyle->minimum))));
style->drawControl( QStyle::CE_ProgressBar, myProgressBarStyle, painter );

View File

@ -364,7 +364,7 @@ TorrentDelegate :: drawTorrent( QPainter * painter, const QStyleOptionViewItem&
myProgressBarStyle->direction = option.direction;
myProgressBarStyle->palette = option.palette;
myProgressBarStyle->palette.setCurrentColorGroup( QPalette::Disabled );
myProgressBarStyle->state = QStyle::State_Off;
myProgressBarStyle->state = option.state | QStyle::State_Small;
myProgressBarStyle->progress = int(myProgressBarStyle->minimum + ((tor.percentDone() * (myProgressBarStyle->maximum - myProgressBarStyle->minimum))));
style->drawControl( QStyle::CE_ProgressBar, myProgressBarStyle, painter );