-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 17 |
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(); |