author | zecke <zecke> | 2004-04-02 19:28:09 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-02 19:28:09 (UTC) |
commit | 97bdc55663590ba430a4f322ad97aab9f4c02bf3 (patch) (side-by-side diff) | |
tree | 8d340684ac97907b73d6b8abf995116f58680cdd /noncore/graphics/opie-eye/gui | |
parent | 09d1ebb55ab44ebd129ff44b83b6b20054df77aa (diff) | |
download | opie-97bdc55663590ba430a4f322ad97aab9f4c02bf3.zip opie-97bdc55663590ba430a4f322ad97aab9f4c02bf3.tar.gz opie-97bdc55663590ba430a4f322ad97aab9f4c02bf3.tar.bz2 |
-Fix realignment of the items but now it updates too often
-Fix slave not to include <qt></qt> for iconViewName
Diffstat (limited to 'noncore/graphics/opie-eye/gui') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 29 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 2 |
2 files changed, 14 insertions, 17 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index b3f0006..ed9fc9c 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp @@ -14,2 +14,3 @@ #include <opie2/okeyconfigwidget.h> +#include <opie2/odebug.h> @@ -44,3 +45,4 @@ namespace { void setText( const QString& ); - void reCalc(); + + private: @@ -72,2 +74,6 @@ namespace { inline QPixmap* IconViewItem::pixmap()const { + qWarning( "Name is " + m_path.right( 15 ) + " rect is %d %d %d %d | %d %d", + rect().x(),rect().y(),rect().width(),rect().height(), + iconView()->contentsX(), iconView()->contentsY()); + if ( m_isDir ) @@ -92,8 +98,2 @@ namespace { QIconViewItem::setText( text ); - reCalc(); - } - - inline void IconViewItem::reCalc() - { - calcRect(); } @@ -124,3 +124,2 @@ PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) m_view->setItemTextPos( QIconView::Right ); - m_view->setResizeMode(QIconView::Adjust); @@ -128,3 +127,3 @@ PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) int viewerWidth = dw-style().scrollBarExtent().width(); - m_view->setGridX( viewerWidth-2*m_view->spacing() ); + m_view->setGridX( viewerWidth-3*m_view->spacing()); m_view->setGridY( fontMetrics().height()*2+40 ); @@ -198,3 +197,3 @@ void PIconView::slotChangeDir(const QString& path) { - m_view->setUpdatesEnabled( false ); + m_view->viewport()->setUpdatesEnabled( false ); m_view->clear(); @@ -202,3 +201,3 @@ void PIconView::slotChangeDir(const QString& path) { addFiles( lister->files() ); - m_view->setUpdatesEnabled( true ); + m_view->viewport()->setUpdatesEnabled( true ); @@ -316,3 +315,2 @@ void PIconView::slotThumbInfo( const QString& _path, const QString& str ) { item->setText( str ); - item->repaint(); g_stringInf.remove( _path ); @@ -327,3 +325,2 @@ void PIconView::slotThumbNail(const QString& _path, const QPixmap &pix) { /* required for a recalculated rectangle. otherwise the view show nonsense! */ - item->reCalc(); } else { @@ -331,3 +328,2 @@ void PIconView::slotThumbNail(const QString& _path, const QPixmap &pix) { } - item->repaint(); g_stringPix.remove( _path ); @@ -359,3 +355,3 @@ void PIconView::slotBeamDone( Ir* ir) { void PIconView::slotStart() { - m_view->setUpdatesEnabled( false ); + m_view->viewport()->setUpdatesEnabled( false ); } @@ -363,3 +359,4 @@ void PIconView::slotStart() { void PIconView::slotEnd() { - m_view->setUpdatesEnabled( true ); + m_view->arrangeItemsInGrid( ); + m_view->viewport()->setUpdatesEnabled( true ); } diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index 0314659..83ff4f1 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp @@ -111,3 +111,3 @@ void PMainWindow::slotConfig() { lst.insert( view, _wid ); - wid->addTab( _wid, QString::null, inf->name() ); + wid->addTab( _wid, "fileopen", inf->name() ); } |