author | llornkcor <llornkcor> | 2003-03-26 02:07:38 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-03-26 02:07:38 (UTC) |
commit | 445c957aeddcea7ee0b83657e00987103a6d35b0 (patch) (unidiff) | |
tree | 4efbff1b8896295e532d1c10dd33e4ab177f014c /noncore/apps/advancedfm | |
parent | a76176911328349414203edda3785ac8925c0648 (diff) | |
download | opie-445c957aeddcea7ee0b83657e00987103a6d35b0.zip opie-445c957aeddcea7ee0b83657e00987103a6d35b0.tar.gz opie-445c957aeddcea7ee0b83657e00987103a6d35b0.tar.bz2 |
change to UnknownDocument icon and scale
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 17 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 2 |
2 files changed, 14 insertions, 5 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index bb7f346..1a5e131 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <qpe/menubutton.h> | 31 | #include <qpe/menubutton.h> |
32 | 32 | ||
33 | 33 | ||
34 | #include <qwmatrix.h> | ||
34 | #include <qregexp.h> | 35 | #include <qregexp.h> |
35 | #include <qtabwidget.h> | 36 | #include <qtabwidget.h> |
36 | #include <qtextstream.h> | 37 | #include <qtextstream.h> |
@@ -73,6 +74,11 @@ AdvancedFm::AdvancedFm( ) | |||
73 | init(); | 74 | init(); |
74 | renameBox = 0; | 75 | renameBox = 0; |
75 | 76 | ||
77 | QWMatrix matrix; | ||
78 | QPixmap pix(Resource::loadPixmap( "UnknownDocument" )); | ||
79 | matrix.scale( .4, .4); | ||
80 | unknownXpm = pix.xForm(matrix); | ||
81 | |||
76 | initConnections(); | 82 | initConnections(); |
77 | whichTab=1; | 83 | whichTab=1; |
78 | rePopulate(); | 84 | rePopulate(); |
@@ -190,10 +196,10 @@ void AdvancedFm::populateView() | |||
190 | else { //everything else goes by mimetype | 196 | else { //everything else goes by mimetype |
191 | MimeType mt(fi->filePath()); | 197 | MimeType mt(fi->filePath()); |
192 | pm=mt.pixmap(); //sets the correct pixmap for mimetype | 198 | pm=mt.pixmap(); //sets the correct pixmap for mimetype |
193 | if(pm.isNull()) | 199 | if(pm.isNull()) { |
194 | pm = Resource::loadPixmap( "UnknownDocument-14" ); | 200 | pm = unknownXpm; |
201 | } | ||
195 | } | 202 | } |
196 | item->setPixmap( 0,pm); | ||
197 | if( fi->isSymLink() && fileL.find("->",0,TRUE) != -1) | 203 | if( fi->isSymLink() && fileL.find("->",0,TRUE) != -1) |
198 | { | 204 | { |
199 | // overlay link image | 205 | // overlay link image |
@@ -202,8 +208,9 @@ void AdvancedFm::populateView() | |||
202 | QPainter painter( &pm ); | 208 | QPainter painter( &pm ); |
203 | painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); | 209 | painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); |
204 | pm.setMask( pm.createHeuristicMask( FALSE ) ); | 210 | pm.setMask( pm.createHeuristicMask( FALSE ) ); |
205 | item->setPixmap( 0, pm); | ||
206 | } | 211 | } |
212 | item->setPixmap( 0,pm); | ||
213 | |||
207 | } | 214 | } |
208 | isDir=FALSE; | 215 | isDir=FALSE; |
209 | ++it; | 216 | ++it; |
@@ -228,7 +235,7 @@ void AdvancedFm::populateView() | |||
228 | if( fileL.find(".") == -1 ) | 235 | if( fileL.find(".") == -1 ) |
229 | { | 236 | { |
230 | item= new QListViewItem( thisView, fileL, fileS, fileDate); | 237 | item= new QListViewItem( thisView, fileL, fileS, fileDate); |
231 | pm = Resource::loadPixmap( "UnknownDocument-14" ); | 238 | pm = unknownXpm; |
232 | item->setPixmap( 0,pm); | 239 | item->setPixmap( 0,pm); |
233 | } | 240 | } |
234 | } | 241 | } |
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index f31956c..c30d8e0 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <qstring.h> | 26 | #include <qstring.h> |
27 | #include <qpoint.h> | 27 | #include <qpoint.h> |
28 | #include <qtimer.h> | 28 | #include <qtimer.h> |
29 | #include <qpixmap.h> | ||
29 | 30 | ||
30 | class OTabWidget; | 31 | class OTabWidget; |
31 | class QVBoxLayout; | 32 | class QVBoxLayout; |
@@ -91,6 +92,7 @@ protected slots: | |||
91 | protected: | 92 | protected: |
92 | 93 | ||
93 | OTabWidget *TabWidget; | 94 | OTabWidget *TabWidget; |
95 | QPixmap unknownXpm; | ||
94 | int whichTab; | 96 | int whichTab; |
95 | // QTabWidget *TabWidget; | 97 | // QTabWidget *TabWidget; |
96 | QWidget *tab, *tab_2, *tab_3; | 98 | QWidget *tab, *tab_2, *tab_3; |