summaryrefslogtreecommitdiff
authoralwin <alwin>2004-11-07 19:37:17 (UTC)
committer alwin <alwin>2004-11-07 19:37:17 (UTC)
commit9218d2bf841e1f999475c86ba602dc1cd7e338f6 (patch) (side-by-side diff)
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
@@ -112,6 +112,4 @@ namespace {
if (_dirPix && _dirPix->width()>m_iconsize) {
- QPixmap*Pix = new QPixmap(*_dirPix);
- Pix->resize(m_iconsize,m_iconsize);
- delete _dirPix;
- _dirPix = Pix;
+ QImage Pix = _dirPix->convertToImage();
+ *_dirPix = Pix.smoothScale(m_iconsize,m_iconsize);
}
@@ -119,5 +117,10 @@ namespace {
if (_unkPix->width()>=m_iconsize) {
- _cpyPix = new QPixmap(*_unkPix);
- if (_unkPix->width()>m_iconsize)
- _cpyPix->resize(m_iconsize,m_iconsize);
+ QImage Pix = _unkPix->convertToImage();
+ _cpyPix = new QPixmap();
+ if (_unkPix->width()>m_iconsize) {
+ *_cpyPix = Pix.smoothScale(m_iconsize,m_iconsize);
+ } else {
+ _cpyPix->convertFromImage(Pix);
+ }
+
} else {