@ -1102,7 +1102,7 @@ void QIconViewItem::setText( const QString &text )
if ( view ) {
if ( QRect ( view - > contentsX ( ) , view - > contentsY ( ) ,
view - > visibleWidth ( ) , view - > visibleHeight ( ) ) .
view - > visibleWidth SB ( ) , view - > visibleHeight SB ( ) ) .
intersects ( oR ) )
view - > repaintContents ( oR . x ( ) - 1 , oR . y ( ) - 1 ,
oR . width ( ) + 2 , oR . height ( ) + 2 , FALSE ) ;
@ -1154,7 +1154,7 @@ void QIconViewItem::setPixmap( const QPixmap &icon )
if ( view ) {
if ( QRect ( view - > contentsX ( ) , view - > contentsY ( ) ,
view - > visibleWidth ( ) , view - > visibleHeight ( ) ) .
view - > visibleWidth SB ( ) , view - > visibleHeight SB ( ) ) .
intersects ( oR ) )
view - > repaintContents ( oR . x ( ) - 1 , oR . y ( ) - 1 ,
oR . width ( ) + 2 , oR . height ( ) + 2 , FALSE ) ;
@ -1190,7 +1190,7 @@ void QIconViewItem::setPicture( const QPicture &icon )
if ( view ) {
if ( QRect ( view - > contentsX ( ) , view - > contentsY ( ) ,
view - > visibleWidth ( ) , view - > visibleHeight ( ) ) .
view - > visibleWidth SB ( ) , view - > visibleHeight SB ( ) ) .
intersects ( oR ) )
view - > repaintContents ( oR . x ( ) - 1 , oR . y ( ) - 1 ,
oR . width ( ) + 2 , oR . height ( ) + 2 , FALSE ) ;
@ -1258,7 +1258,7 @@ void QIconViewItem::setPixmap( const QPixmap &icon, bool recalc, bool redraw )
if ( view ) {
if ( QRect ( view - > contentsX ( ) , view - > contentsY ( ) ,
view - > visibleWidth ( ) , view - > visibleHeight ( ) ) .
view - > visibleWidth SB ( ) , view - > visibleHeight SB ( ) ) .
intersects ( oR ) )
view - > repaintContents ( oR . x ( ) - 1 , oR . y ( ) - 1 ,
oR . width ( ) + 2 , oR . height ( ) + 2 , FALSE ) ;
@ -5633,8 +5633,8 @@ void QIconView::insertInGrid( QIconViewItem *item )
}
item - > dirty = FALSE ;
} else {
QRegion r ( QRect ( 0 , 0 , QMAX ( contentsWidth ( ) , visibleWidth ( ) ) ,
QMAX ( contentsHeight ( ) , visibleHeight ( ) ) ) ) ;
QRegion r ( QRect ( 0 , 0 , QMAX ( contentsWidth ( ) , visibleWidth SB ( ) ) ,
QMAX ( contentsHeight ( ) , visibleHeight SB ( ) ) ) ) ;
QIconViewItem * i = d - > firstItem ;
int y = - 1 ;
@ -5897,7 +5897,7 @@ QIconViewItem *QIconView::makeRowLayout( QIconViewItem *begin, int &y, bool &cha
QIconViewItem * item = begin ;
for ( ; ; ) {
x + = d - > spacing + item - > width ( ) ;
if ( x > visibleWidth ( ) & & item ! = begin ) {
if ( x > visibleWidth SB ( ) & & item ! = begin ) {
item = item - > prev ;
while ( item & & ( item - > isVisible ( ) = = FALSE ) ) {
item = item - > prev ;
@ -5928,7 +5928,7 @@ QIconViewItem *QIconView::makeRowLayout( QIconViewItem *begin, int &y, bool &cha
int x ;
if ( item = = begin ) {
if ( reverse )
x = visibleWidth ( ) - d - > spacing - item - > width ( ) ;
x = visibleWidth SB ( ) - d - > spacing - item - > width ( ) ;
else
x = d - > spacing ;
} else {
@ -5964,7 +5964,7 @@ QIconViewItem *QIconView::makeRowLayout( QIconViewItem *begin, int &y, bool &cha
i + = r ;
x = i * d - > rastX + sp * d - > spacing ;
}
if ( x > visibleWidth ( ) & & item ! = begin ) {
if ( x > visibleWidth SB ( ) & & item ! = begin ) {
item = item - > prev ;
while ( item & & ( item - > isVisible ( ) = = FALSE ) ) {
item = item - > prev ;
@ -6036,7 +6036,7 @@ QIconViewItem *QIconView::makeRowLayout( QIconViewItem *begin, int &y, bool &cha
QIconViewItem * item = begin ;
for ( ; ; ) {
y + = d - > spacing + item - > height ( ) ;
if ( y > visibleHeight ( ) & & item ! = begin ) {
if ( y > visibleHeight SB ( ) & & item ! = begin ) {
item = item - > prev ;
while ( item & & ( item - > isVisible ( ) = = FALSE ) ) {
item = item - > prev ;
@ -6600,4 +6600,24 @@ bool QIconView::isRenaming() const
# endif
}
int QIconView : : visibleWidthSB ( ) const
{
if ( vScrollBarMode ( ) ! = Auto )
return visibleWidth ( ) ;
int offset = verticalScrollBar ( ) - > isVisible ( ) ? 0
: style ( ) . pixelMetric ( QStyle : : PM_ScrollBarExtent , verticalScrollBar ( ) ) ;
return QMAX ( 0 , visibleWidth ( ) - offset ) ;
}
int QIconView : : visibleHeightSB ( ) const
{
if ( hScrollBarMode ( ) ! = Auto )
return visibleHeight ( ) ;
int offset = horizontalScrollBar ( ) - > isVisible ( ) ? 0
: style ( ) . pixelMetric ( QStyle : : PM_ScrollBarExtent , horizontalScrollBar ( ) ) ;
return QMAX ( 0 , visibleHeight ( ) - offset ) ;
}
# endif // QT_NO_ICONVIEW