- Timestamp:
- Jul 29, 2010, 3:41:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/styles/qcommonstyle.cpp
r651 r764 6009 6009 QSize smallSz, largeSz; 6010 6010 foreach(const QSize &asz, sizes) { 6011 if (asz.width() < small )6011 if (asz.width() < small && asz.width() > smallSz.width()) 6012 6012 smallSz = asz; 6013 else if (asz.width() < large )6013 else if (asz.width() < large && asz.width() > largeSz.width()) 6014 6014 largeSz = asz; 6015 else 6016 break; 6015 } 6016 if (smallSz.isValid() && !largeSz.isValid()) { 6017 // add the large icon if missing by up-scaling the small one by 2 6018 QPixmap p = icon.pixmap(smallSz, mm, ss); 6019 largeSz = smallSz * 2; 6020 icon.addPixmap(p.scaled(largeSz, Qt::KeepAspectRatio, 6021 Qt::SmoothTransformation)); 6022 } else if (largeSz.isValid() && !smallSz.isValid()) { 6023 // add the small icon if missing by down-scaling the large one by 2 6024 QPixmap p = icon.pixmap(largeSz, mm, ss); 6025 largeSz = largeSz / 2; 6026 icon.addPixmap(p.scaled(smallSz, Qt::KeepAspectRatio, 6027 Qt::SmoothTransformation)); 6017 6028 } 6018 6029 if (smallSz.isValid()) {
Note:
See TracChangeset
for help on using the changeset viewer.