summaryrefslogtreecommitdiff
authoralwin <alwin>2004-11-07 19:37:17 (UTC)
committer alwin <alwin>2004-11-07 19:37:17 (UTC)
commit9218d2bf841e1f999475c86ba602dc1cd7e338f6 (patch) (unidiff)
treeeb02e9dc2d1d4e8188f2c7cf8260d81298352117
parentc7eb493b3c2efa871104b27b6abf487da94f33f6 (diff)
downloadopie-9218d2bf841e1f999475c86ba602dc1cd7e338f6.zip
opie-9218d2bf841e1f999475c86ba602dc1cd7e338f6.tar.gz
opie-9218d2bf841e1f999475c86ba602dc1cd7e338f6.tar.bz2
try to improve the icon scaling
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index f173ecc..5472ead 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -110,16 +110,19 @@ namespace {
110 inline void IconViewItem::check_pix()const 110 inline void IconViewItem::check_pix()const
111 { 111 {
112 if (_dirPix && _dirPix->width()>m_iconsize) { 112 if (_dirPix && _dirPix->width()>m_iconsize) {
113 QPixmap*Pix = new QPixmap(*_dirPix); 113 QImage Pix = _dirPix->convertToImage();
114 Pix->resize(m_iconsize,m_iconsize); 114 *_dirPix = Pix.smoothScale(m_iconsize,m_iconsize);
115 delete _dirPix;
116 _dirPix = Pix;
117 } 115 }
118 if (!_cpyPix && _unkPix) { 116 if (!_cpyPix && _unkPix) {
119 if (_unkPix->width()>=m_iconsize) { 117 if (_unkPix->width()>=m_iconsize) {
120 _cpyPix = new QPixmap(*_unkPix); 118 QImage Pix = _unkPix->convertToImage();
121 if (_unkPix->width()>m_iconsize) 119 _cpyPix = new QPixmap();
122 _cpyPix->resize(m_iconsize,m_iconsize); 120 if (_unkPix->width()>m_iconsize) {
121 *_cpyPix = Pix.smoothScale(m_iconsize,m_iconsize);
122 } else {
123 _cpyPix->convertFromImage(Pix);
124 }
125
123 } else { 126 } else {
124 _cpyPix = new QPixmap(m_iconsize,m_iconsize); 127 _cpyPix = new QPixmap(m_iconsize,m_iconsize);
125 _cpyPix->fill(); 128 _cpyPix->fill();