Diffstat (limited to 'noncore/graphics/opie-eye/gui/iconview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index aeaa3c6..74a8d0f 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp | |||
@@ -77,24 +77,25 @@ namespace { | |||
77 | m_pix = PPixmapCache::self()->cachedImage( m_path, 64, 64 ); | 77 | m_pix = PPixmapCache::self()->cachedImage( m_path, 64, 64 ); |
78 | if ( !m_pix && !g_stringPix.contains( m_path )) { | 78 | if ( !m_pix && !g_stringPix.contains( m_path )) { |
79 | currentView()->dirLister()->thumbNail( m_path, 64, 64 ); | 79 | currentView()->dirLister()->thumbNail( m_path, 64, 64 ); |
80 | g_stringPix.insert( m_path, const_cast<IconViewItem*>(this)); | 80 | g_stringPix.insert( m_path, const_cast<IconViewItem*>(this)); |
81 | } | 81 | } |
82 | return m_pix ? m_pix : _unkPix; | 82 | return m_pix ? m_pix : _unkPix; |
83 | } | 83 | } |
84 | } | 84 | } |
85 | inline void IconViewItem::setText( const QString& str ) { | 85 | inline void IconViewItem::setText( const QString& str ) { |
86 | QString text = QIconViewItem::text()+"\n"+str; | 86 | QString text = QIconViewItem::text()+"\n"+str; |
87 | m_noInfo = true; | 87 | m_noInfo = true; |
88 | QIconViewItem::setText( text ); | 88 | QIconViewItem::setText( text ); |
89 | reCalc(); | ||
89 | } | 90 | } |
90 | 91 | ||
91 | inline void IconViewItem::reCalc() | 92 | inline void IconViewItem::reCalc() |
92 | { | 93 | { |
93 | calcRect(); | 94 | calcRect(); |
94 | } | 95 | } |
95 | } | 96 | } |
96 | 97 | ||
97 | 98 | ||
98 | PIconView::PIconView( QWidget* wid, Config* cfg ) | 99 | PIconView::PIconView( QWidget* wid, Config* cfg ) |
99 | : QVBox( wid ), m_cfg( cfg ) | 100 | : QVBox( wid ), m_cfg( cfg ) |
100 | { | 101 | { |
@@ -257,25 +258,25 @@ void PIconView::slotClicked(QIconViewItem* _it) { | |||
257 | IconViewItem* it = static_cast<IconViewItem*>(_it); | 258 | IconViewItem* it = static_cast<IconViewItem*>(_it); |
258 | if( it->isDir() ) | 259 | if( it->isDir() ) |
259 | slotChangeDir( it->path() ); | 260 | slotChangeDir( it->path() ); |
260 | else // view image | 261 | else // view image |
261 | ; | 262 | ; |
262 | } | 263 | } |
263 | 264 | ||
264 | void PIconView::slotThumbInfo( const QString& _path, const QString& str ) { | 265 | void PIconView::slotThumbInfo( const QString& _path, const QString& str ) { |
265 | if ( g_stringInf.contains( _path ) ) { | 266 | if ( g_stringInf.contains( _path ) ) { |
266 | IconViewItem* item = g_stringInf[_path]; | 267 | IconViewItem* item = g_stringInf[_path]; |
267 | /* if set the view shows nonsens! | 268 | /* if set the view shows nonsens! |
268 | I dont know how to fix the format of displayed text :(*/ | 269 | I dont know how to fix the format of displayed text :(*/ |
269 | //item->setText( str ); | 270 | item->setText( str ); |
270 | item->repaint(); | 271 | item->repaint(); |
271 | g_stringInf.remove( _path ); | 272 | g_stringInf.remove( _path ); |
272 | } | 273 | } |
273 | } | 274 | } |
274 | void PIconView::slotThumbNail(const QString& _path, const QPixmap &pix) { | 275 | void PIconView::slotThumbNail(const QString& _path, const QPixmap &pix) { |
275 | if ( g_stringPix.contains( _path ) ) { | 276 | if ( g_stringPix.contains( _path ) ) { |
276 | IconViewItem* item = g_stringPix[_path]; | 277 | IconViewItem* item = g_stringPix[_path]; |
277 | 278 | ||
278 | if (pix.width()>0) { | 279 | if (pix.width()>0) { |
279 | PPixmapCache::self()->insertImage( _path, pix, 64, 64 ); | 280 | PPixmapCache::self()->insertImage( _path, pix, 64, 64 ); |
280 | /* required for a recalculated rectangle. otherwise the view show nonsense! */ | 281 | /* required for a recalculated rectangle. otherwise the view show nonsense! */ |
281 | item->reCalc(); | 282 | item->reCalc(); |