summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index 729b64f..aeaa3c6 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -40,2 +40,3 @@ namespace {
void setText( const QString& );
+ void reCalc();
private:
@@ -88,2 +89,7 @@ namespace {
}
+
+ inline void IconViewItem::reCalc()
+ {
+ calcRect();
+ }
}
@@ -113,3 +119,3 @@ PIconView::PIconView( QWidget* wid, Config* cfg )
m_view->setItemTextPos( QIconView::Right );
-
+ m_view->setResizeMode(QIconView::Adjust);
@@ -260,3 +266,5 @@ void PIconView::slotThumbInfo( const QString& _path, const QString& str ) {
IconViewItem* item = g_stringInf[_path];
- item->setText( str );
+ /* if set the view shows nonsens!
+ I dont know how to fix the format of displayed text :(*/
+ //item->setText( str );
item->repaint();
@@ -268,3 +276,10 @@ void PIconView::slotThumbNail(const QString& _path, const QPixmap &pix) {
IconViewItem* item = g_stringPix[_path];
- PPixmapCache::self()->insertImage( _path, pix, 64, 64 );
+
+ if (pix.width()>0) {
+ PPixmapCache::self()->insertImage( _path, pix, 64, 64 );
+ /* required for a recalculated rectangle. otherwise the view show nonsense! */
+ item->reCalc();
+ } else {
+ PPixmapCache::self()->insertImage(_path,Resource::loadPixmap( "UnknownDocument" ),64,64 );
+ }
item->repaint();