@ -1107,7 +1107,7 @@ void TQIconViewItem::setText( const TQString &text )
if ( view ) {
if ( view ) {
if ( TQRect ( view - > contentsX ( ) , view - > contentsY ( ) ,
if ( TQRect ( view - > contentsX ( ) , view - > contentsY ( ) ,
view - > visibleWidth ( ) , view - > visibleHeight ( ) ) .
view - > visibleWidth SB ( ) , view - > visibleHeight SB ( ) ) .
intersects ( oR ) )
intersects ( oR ) )
view - > repaintContents ( oR . x ( ) - 1 , oR . y ( ) - 1 ,
view - > repaintContents ( oR . x ( ) - 1 , oR . y ( ) - 1 ,
oR . width ( ) + 2 , oR . height ( ) + 2 , FALSE ) ;
oR . width ( ) + 2 , oR . height ( ) + 2 , FALSE ) ;
@ -1159,7 +1159,7 @@ void TQIconViewItem::setPixmap( const TQPixmap &icon )
if ( view ) {
if ( view ) {
if ( TQRect ( view - > contentsX ( ) , view - > contentsY ( ) ,
if ( TQRect ( view - > contentsX ( ) , view - > contentsY ( ) ,
view - > visibleWidth ( ) , view - > visibleHeight ( ) ) .
view - > visibleWidth SB ( ) , view - > visibleHeight SB ( ) ) .
intersects ( oR ) )
intersects ( oR ) )
view - > repaintContents ( oR . x ( ) - 1 , oR . y ( ) - 1 ,
view - > repaintContents ( oR . x ( ) - 1 , oR . y ( ) - 1 ,
oR . width ( ) + 2 , oR . height ( ) + 2 , FALSE ) ;
oR . width ( ) + 2 , oR . height ( ) + 2 , FALSE ) ;
@ -1195,7 +1195,7 @@ void TQIconViewItem::setPicture( const TQPicture &icon )
if ( view ) {
if ( view ) {
if ( TQRect ( view - > contentsX ( ) , view - > contentsY ( ) ,
if ( TQRect ( view - > contentsX ( ) , view - > contentsY ( ) ,
view - > visibleWidth ( ) , view - > visibleHeight ( ) ) .
view - > visibleWidth SB ( ) , view - > visibleHeight SB ( ) ) .
intersects ( oR ) )
intersects ( oR ) )
view - > repaintContents ( oR . x ( ) - 1 , oR . y ( ) - 1 ,
view - > repaintContents ( oR . x ( ) - 1 , oR . y ( ) - 1 ,
oR . width ( ) + 2 , oR . height ( ) + 2 , FALSE ) ;
oR . width ( ) + 2 , oR . height ( ) + 2 , FALSE ) ;
@ -1263,7 +1263,7 @@ void TQIconViewItem::setPixmap( const TQPixmap &icon, bool recalc, bool redraw )
if ( view ) {
if ( view ) {
if ( TQRect ( view - > contentsX ( ) , view - > contentsY ( ) ,
if ( TQRect ( view - > contentsX ( ) , view - > contentsY ( ) ,
view - > visibleWidth ( ) , view - > visibleHeight ( ) ) .
view - > visibleWidth SB ( ) , view - > visibleHeight SB ( ) ) .
intersects ( oR ) )
intersects ( oR ) )
view - > repaintContents ( oR . x ( ) - 1 , oR . y ( ) - 1 ,
view - > repaintContents ( oR . x ( ) - 1 , oR . y ( ) - 1 ,
oR . width ( ) + 2 , oR . height ( ) + 2 , FALSE ) ;
oR . width ( ) + 2 , oR . height ( ) + 2 , FALSE ) ;
@ -5638,8 +5638,8 @@ void TQIconView::insertInGrid( TQIconViewItem *item )
}
}
item - > dirty = FALSE ;
item - > dirty = FALSE ;
} else {
} else {
TQRegion r ( TQRect ( 0 , 0 , TQMAX ( contentsWidth ( ) , visibleWidth ( ) ) ,
TQRegion r ( TQRect ( 0 , 0 , TQMAX ( contentsWidth ( ) , visibleWidth SB ( ) ) ,
TQMAX ( contentsHeight ( ) , visibleHeight ( ) ) ) ) ;
TQMAX ( contentsHeight ( ) , visibleHeight SB ( ) ) ) ) ;
TQIconViewItem * i = d - > firstItem ;
TQIconViewItem * i = d - > firstItem ;
int y = - 1 ;
int y = - 1 ;
@ -5902,7 +5902,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
TQIconViewItem * item = begin ;
TQIconViewItem * item = begin ;
for ( ; ; ) {
for ( ; ; ) {
x + = d - > spacing + item - > width ( ) ;
x + = d - > spacing + item - > width ( ) ;
if ( x > visibleWidth ( ) & & item ! = begin ) {
if ( x > visibleWidth SB ( ) & & item ! = begin ) {
item = item - > prev ;
item = item - > prev ;
while ( item & & ( item - > isVisible ( ) = = FALSE ) ) {
while ( item & & ( item - > isVisible ( ) = = FALSE ) ) {
item = item - > prev ;
item = item - > prev ;
@ -5933,7 +5933,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
int x ;
int x ;
if ( item = = begin ) {
if ( item = = begin ) {
if ( reverse )
if ( reverse )
x = visibleWidth ( ) - d - > spacing - item - > width ( ) ;
x = visibleWidth SB ( ) - d - > spacing - item - > width ( ) ;
else
else
x = d - > spacing ;
x = d - > spacing ;
} else {
} else {
@ -5969,7 +5969,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
i + = r ;
i + = r ;
x = i * d - > rastX + sp * d - > spacing ;
x = i * d - > rastX + sp * d - > spacing ;
}
}
if ( x > visibleWidth ( ) & & item ! = begin ) {
if ( x > visibleWidth SB ( ) & & item ! = begin ) {
item = item - > prev ;
item = item - > prev ;
while ( item & & ( item - > isVisible ( ) = = FALSE ) ) {
while ( item & & ( item - > isVisible ( ) = = FALSE ) ) {
item = item - > prev ;
item = item - > prev ;
@ -6041,7 +6041,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
TQIconViewItem * item = begin ;
TQIconViewItem * item = begin ;
for ( ; ; ) {
for ( ; ; ) {
y + = d - > spacing + item - > height ( ) ;
y + = d - > spacing + item - > height ( ) ;
if ( y > visibleHeight ( ) & & item ! = begin ) {
if ( y > visibleHeight SB ( ) & & item ! = begin ) {
item = item - > prev ;
item = item - > prev ;
while ( item & & ( item - > isVisible ( ) = = FALSE ) ) {
while ( item & & ( item - > isVisible ( ) = = FALSE ) ) {
item = item - > prev ;
item = item - > prev ;
@ -6605,4 +6605,24 @@ bool TQIconView::isRenaming() const
# endif
# endif
}
}
int TQIconView : : visibleWidthSB ( ) const
{
if ( vScrollBarMode ( ) ! = Auto )
return visibleWidth ( ) ;
int offset = verticalScrollBar ( ) - > isVisible ( ) ? 0
: style ( ) . pixelMetric ( TQStyle : : PM_ScrollBarExtent , verticalScrollBar ( ) ) ;
return TQMAX ( 0 , visibleWidth ( ) - offset ) ;
}
int TQIconView : : visibleHeightSB ( ) const
{
if ( hScrollBarMode ( ) ! = Auto )
return visibleHeight ( ) ;
int offset = horizontalScrollBar ( ) - > isVisible ( ) ? 0
: style ( ) . pixelMetric ( TQStyle : : PM_ScrollBarExtent , horizontalScrollBar ( ) ) ;
return TQMAX ( 0 , visibleHeight ( ) - offset ) ;
}
# endif // QT_NO_ICONVIEW
# endif // QT_NO_ICONVIEW