summaryrefslogtreecommitdiff
authordrw <drw>2005-03-02 19:32:43 (UTC)
committer drw <drw>2005-03-02 19:32:43 (UTC)
commit9f3e0913c7b01c1e14f907e756999b9d9bf9ceef (patch) (unidiff)
treec117c38bbbeb630adbe2f25025ff97dc02475a88
parentaf157881a6265b1ea9e74d61853c2d3d865a6080 (diff)
downloadopie-9f3e0913c7b01c1e14f907e756999b9d9bf9ceef.zip
opie-9f3e0913c7b01c1e14f907e756999b9d9bf9ceef.tar.gz
opie-9f3e0913c7b01c1e14f907e756999b9d9bf9ceef.tar.bz2
Scale icons approprtely
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 56e3282..fd81313 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -136,20 +136,20 @@ void AdvancedFm::populateView() {
136 if(isDir || fileL.find("/",0,TRUE) != -1) { 136 if(isDir || fileL.find("/",0,TRUE) != -1) {
137 137
138 if( !QDir( fi->filePath() ).isReadable()) //is directory 138 if( !QDir( fi->filePath() ).isReadable()) //is directory
139 pm = Resource::loadPixmap( "lockedfolder" ); 139 pm.convertFromImage( Resource::loadImage( "lockedfolder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
140 else 140 else
141 pm= Resource::loadPixmap( "folder" ); 141 pm.convertFromImage( Resource::loadImage( "folder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
142 } 142 }
143 else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) { 143 else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) {
144 pm = Resource::loadPixmap( "exec"); 144 pm.convertFromImage( Resource::loadImage( "exec" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
145 } 145 }
146 else if( (fileInfo.permission( QFileInfo::ExeUser) 146 else if( (fileInfo.permission( QFileInfo::ExeUser)
147 | fileInfo.permission( QFileInfo::ExeGroup) 147 | fileInfo.permission( QFileInfo::ExeGroup)
148 | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) { 148 | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) {
149 pm = Resource::loadPixmap( "exec"); 149 pm.convertFromImage( Resource::loadImage( "exec" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
150 } 150 }
151 else if( !fi->isReadable() ) { 151 else if( !fi->isReadable() ) {
152 pm = Resource::loadPixmap( "locked" ); 152 pm.convertFromImage( Resource::loadImage( "locked" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
153 } 153 }
154 else { //everything else goes by mimetype 154 else { //everything else goes by mimetype
155 MimeType mt(fi->filePath()); 155 MimeType mt(fi->filePath());
@@ -160,14 +160,14 @@ void AdvancedFm::populateView() {
160 } 160 }
161 if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) { 161 if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) {
162 // odebug << " overlay link image" << oendl; 162 // odebug << " overlay link image" << oendl;
163 pm= Resource::loadPixmap( "advancedfm/symlink" ); 163 pm.convertFromImage( Resource::loadImage( "advancedfm/symlink" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
164 // pm= Resource::loadPixmap( "folder" ); 164 // pm= Resource::loadPixmap( "folder" );
165// QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); 165// QPixmap lnk = Resource::loadPixmap( "opie/symlink" );
166// QPainter painter( &pm ); 166// QPainter painter( &pm );
167// painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); 167// painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk );
168// pm.setMask( pm.createHeuristicMask( FALSE ) ); 168// pm.setMask( pm.createHeuristicMask( FALSE ) );
169 } 169 }
170 item->setPixmap( 0,pm); 170 item->setPixmap( 0, pm );
171 171
172 } 172 }
173 isDir=FALSE; 173 isDir=FALSE;