[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/libkonq
From: Martin Koller <m.koller () surfeu ! at>
Date: 2004-12-29 12:11:10
Message-ID: 20041229121110.A2FB1196A7 () office ! kde ! org
[Download RAW message or body]
CVS commit by mkoller:
BUG 91575: correctly setMaxItemWidth also for new items
M +13 -7 konq_iconviewwidget.cc 1.310
--- kdebase/libkonq/konq_iconviewwidget.cc #1.309:1.310
@@ -748,5 +748,8 @@ void KonqIconViewWidget::gridValues( int
*dx = w / *nx;
*dy = h / *ny;
- kdDebug(1203) << "dx = " << *dx << ", dy = " << *dy << "\n";
+ kdDebug(1203) << "x=" << *x << " y=" << *y << " spacing=" << spacing() << " iconSize=" << iconSize
+ << " w=" << w << " h=" << h
+ << " nx=" << *nx << " ny=" << *ny
+ << " dx=" << *dx << " dy=" << *dy << endl;
}
@@ -1507,10 +1510,6 @@ void KonqIconViewWidget::insertInGrid(QI
void KonqIconViewWidget::lineupIcons()
{
- if ( !firstItem() ) {
- kdDebug(1203) << "No icons at all ?\n";
- return;
- }
-
- int iconSize = m_size ? m_size : KGlobal::iconLoader()->currentSize( KIcon::Desktop );
+ // even if there are no items yet, calculate the maxItemWidth to have the correct
+ // item rect when we insert new items
// Create a grid of (ny x nx) bins.
@@ -1526,4 +1525,11 @@ void KonqIconViewWidget::lineupIcons()
}
+ if ( !firstItem() ) {
+ kdDebug(1203) << "No icons at all ?\n";
+ return;
+ }
+
+ int iconSize = m_size ? m_size : KGlobal::iconLoader()->currentSize( KIcon::Desktop );
+
typedef QValueList<QIconViewItem*> Bin;
Bin*** bins = new Bin**[nx];
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic