Changeset 8 for trunk/src/styles/qcommonstyle.cpp
- Timestamp:
- Nov 16, 2005, 8:36:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/styles/qcommonstyle.cpp
r7 r8 146 146 #ifndef QT_NO_LISTVIEW 147 147 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 ); 149 162 break; } 150 163 case PE_CheckListExclusiveIndicator: {
Note:
See TracChangeset
for help on using the changeset viewer.