author | llornkcor <llornkcor> | 2002-03-24 22:30:34 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-03-24 22:30:34 (UTC) |
commit | 8cada0d43b00686567295e712f9c5c89e3977a7d (patch) (unidiff) | |
tree | c68219b8731b391b8512b9454a62dde62f5dddc4 | |
parent | 59e2a88589d8d3fce1a395d073516d99b4e46e78 (diff) | |
download | opie-8cada0d43b00686567295e712f9c5c89e3977a7d.zip opie-8cada0d43b00686567295e712f9c5c89e3977a7d.tar.gz opie-8cada0d43b00686567295e712f9c5c89e3977a7d.tar.bz2 |
added symplink icon
-rw-r--r-- | core/apps/textedit/fileBrowser.cpp | 18 | ||||
-rw-r--r-- | core/apps/textedit/textedit.cpp | 2 |
2 files changed, 15 insertions, 5 deletions
diff --git a/core/apps/textedit/fileBrowser.cpp b/core/apps/textedit/fileBrowser.cpp index eea7144..41e800c 100644 --- a/core/apps/textedit/fileBrowser.cpp +++ b/core/apps/textedit/fileBrowser.cpp | |||
@@ -190,21 +190,31 @@ void fileBrowser::populateList() | |||
190 | if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { | 190 | if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { |
191 | fileL+="/"; | 191 | fileL+="/"; |
192 | isDir=TRUE; | 192 | isDir=TRUE; |
193 | // qDebug( fileL); | 193 | // qDebug( fileL); |
194 | } | 194 | } |
195 | } | 195 | } |
196 | if(fileL !="./") { | 196 | if(fileL !="./") { |
197 | item= new QListViewItem( ListView,fileL,fileS , fileDate); | 197 | item= new QListViewItem( ListView,fileL,fileS , fileDate); |
198 | if(isDir || fileL.find("/",0,TRUE) != -1) | 198 | QPixmap pm; |
199 | item->setPixmap( 0, Resource::loadPixmap( "folder" )); | 199 | pm= Resource::loadPixmap( "folder" ); |
200 | else | 200 | if(isDir || fileL.find("/",0,TRUE) != -1) |
201 | item->setPixmap( 0, Resource::loadPixmap( "fileopen" )); | 201 | item->setPixmap( 0,pm ); |
202 | else | ||
203 | item->setPixmap( 0, Resource::loadPixmap( "fileopen" )); | ||
204 | if( fileL.find("->",0,TRUE) != -1) { | ||
205 | // overlay link image | ||
206 | QPixmap lnk = Resource::loadPixmap( "symlink" ); | ||
207 | QPainter painter( &pm ); | ||
208 | painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); | ||
209 | pm.setMask( pm.createHeuristicMask( FALSE ) ); | ||
210 | item->setPixmap( 0, pm); | ||
202 | } | 211 | } |
212 | } | ||
203 | isDir=FALSE; | 213 | isDir=FALSE; |
204 | ++it; | 214 | ++it; |
205 | } | 215 | } |
206 | ListView->setSorting( 3, FALSE); | 216 | ListView->setSorting( 3, FALSE); |
207 | QString currentPath = currentDir.canonicalPath(); | 217 | QString currentPath = currentDir.canonicalPath(); |
208 | 218 | ||
209 | fillCombo( (const QString &)currentPath); | 219 | fillCombo( (const QString &)currentPath); |
210 | // dirPathCombo->lineEdit()->setText(currentPath); | 220 | // dirPathCombo->lineEdit()->setText(currentPath); |
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index da74893..ecebe12 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -373,17 +373,17 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) | |||
373 | 373 | ||
374 | searchBar->hide(); | 374 | searchBar->hide(); |
375 | 375 | ||
376 | editor = new QpeEditor( this ); | 376 | editor = new QpeEditor( this ); |
377 | setCentralWidget( editor ); | 377 | setCentralWidget( editor ); |
378 | editor->setFrameStyle( QFrame::Panel | QFrame::Sunken ); | 378 | editor->setFrameStyle( QFrame::Panel | QFrame::Sunken ); |
379 | connect( editor, SIGNAL( textChanged() ), this, SLOT( editorChanged() ) ); | 379 | connect( editor, SIGNAL( textChanged() ), this, SLOT( editorChanged() ) ); |
380 | 380 | ||
381 | resize( 200, 300 ); | 381 | // resize( 200, 300 ); |
382 | 382 | ||
383 | // setFontSize(defsize,TRUE); | 383 | // setFontSize(defsize,TRUE); |
384 | FontDatabase fdb; | 384 | FontDatabase fdb; |
385 | QFont defaultFont=editor->font(); | 385 | QFont defaultFont=editor->font(); |
386 | QFontInfo fontInfo(defaultFont); | 386 | QFontInfo fontInfo(defaultFont); |
387 | 387 | ||
388 | cfg.setGroup("Font"); | 388 | cfg.setGroup("Font"); |
389 | QString family = cfg.readEntry("Family", fontInfo.family()); | 389 | QString family = cfg.readEntry("Family", fontInfo.family()); |