Ignore:
Timestamp:
Nov 16, 2005, 8:36:46 PM (20 years ago)
Author:
dmik
Message:

Transferred Qt for OS/2 version 3.3.1-rc5 sources from the CVS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/styles/qcommonstyle.cpp

    r7 r8  
    146146#ifndef QT_NO_LISTVIEW
    147147    case PE_CheckListController: {
    148         p->drawPixmap(r, QPixmap((const char **)check_list_controller_xpm));
     148        QRect pr( r );
     149        QPixmap px( (const char **)check_list_controller_xpm );
     150        // center pixmap if smaller, otherwise it will be scaled to fit
     151        int d = pr.width() - px.width();
     152        if ( d > 0 ) {
     153            pr.setX( pr.x() + d / 2 );
     154            pr.setWidth( px.width() );
     155        }
     156        d = pr.height() - px.height();
     157        if ( d > 0 ) {
     158            pr.setY( pr.y() + d / 2 );
     159            pr.setHeight( px.height() );
     160        }
     161        p->drawPixmap( pr, px );
    149162        break; }
    150163    case PE_CheckListExclusiveIndicator: {
Note: See TracChangeset for help on using the changeset viewer.