Ignore:
Timestamp:
Aug 2, 2010, 6:31:27 PM (12 years ago)
Author:
charles
Message:

(trunk qt) minor cleanup in the delegate code

File:
1 edited

Legend:

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

    r11092 r11097  
    279279    const QFontMetrics nameFM( nameFont );
    280280    const QString nameStr( tor.name( ) );
    281     const QSize nameSize( nameFM.size( 0, nameStr ) );
     281    const int nameWidth = nameFM.width( nameStr );
    282282    QFont statusFont( option.font );
    283283    statusFont.setPointSize( int( option.font.pointSize( ) * 0.9 ) );
    284284    const QFontMetrics statusFM( statusFont );
    285285    const QString statusStr( statusString( tor ) );
    286     const QSize statusSize( statusFM.size( 0, statusStr ) );
     286    const int statusWidth = statusFM.width( statusStr );
    287287    QFont progressFont( statusFont );
    288288    const QFontMetrics progressFM( progressFont );
    289289    const QString progressStr( progressString( tor ) );
    290     const QSize progressSize( progressFM.size( 0, progressStr ) );
     290    const int progressWidth = progressFM.width( progressStr );
    291291    const QSize m( margin( *style ) );
    292     return QSize( m.width()*2 + iconSize + GUI_PAD + MAX3( nameSize.width(), statusSize.width(), progressSize.width() ),
     292    return QSize( m.width()*2 + iconSize + GUI_PAD + MAX3( nameWidth, statusWidth, progressWidth ),
    293293                  //m.height()*3 + nameFM.lineSpacing() + statusFM.lineSpacing()*2 + progressFM.lineSpacing() );
    294294                  m.height()*3 + nameFM.lineSpacing() + statusFM.lineSpacing() + BAR_HEIGHT + progressFM.lineSpacing() );
Note: See TracChangeset for help on using the changeset viewer.