summaryrefslogtreecommitdiffstats
path: root/libkonq/konq_iconviewwidget.cc
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2014-11-14 12:57:59 -0600
committerTimothy Pearson <[email protected]>2014-11-14 12:57:59 -0600
commitf07158cd9dcb61b32e7dba5674e8ed0f7c8c6fe2 (patch)
tree57df7f3e690c3c20855bd03849b65ae13dbd5486 /libkonq/konq_iconviewwidget.cc
parentf943ed4a5828c3dafbc987602115cfdf3c53ddcc (diff)
downloadtdebase-f07158cd9dcb61b32e7dba5674e8ed0f7c8c6fe2.tar.gz
tdebase-f07158cd9dcb61b32e7dba5674e8ed0f7c8c6fe2.zip
Fix large file previews that were broken in GIT hash 3e7ad37f
Diffstat (limited to 'libkonq/konq_iconviewwidget.cc')
-rw-r--r--libkonq/konq_iconviewwidget.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/libkonq/konq_iconviewwidget.cc b/libkonq/konq_iconviewwidget.cc
index 8cb222659..96e04df29 100644
--- a/libkonq/konq_iconviewwidget.cc
+++ b/libkonq/konq_iconviewwidget.cc
@@ -709,14 +709,16 @@ void KonqIconViewWidget::setItemTextPos( ItemTextPos pos )
// can't call gridXValue() because this already would need the new itemTextPos()
int sz = m_size ? m_size : TDEGlobal::iconLoader()->currentSize( TDEIcon::Desktop );
- if ( m_bSetGridX )
- if ( pos == TQIconView::Bottom )
+ if ( m_bSetGridX ) {
+ if ( pos == TQIconView::Bottom ) {
setGridX( TQMAX( sz + 50, previewIconSize( sz ) + 13 ) );
+ }
else
{
setMaxItemWidth( TQMAX( sz, previewIconSize( sz ) ) + m_pSettings->iconTextWidth() );
setGridX( -1 );
}
+ }
TDEIconView::setItemTextPos( pos );
}
@@ -773,14 +775,16 @@ void KonqIconViewWidget::gridValues( int* x, int* y, int* dx, int* dy,
void KonqIconViewWidget::calculateGridX()
{
- if ( m_bSetGridX )
- if ( itemTextPos() == TQIconView::Bottom )
+ if ( m_bSetGridX ) {
+ if ( itemTextPos() == TQIconView::Bottom ) {
setGridX( gridXValue() );
+ }
else
{
setMaxItemWidth( gridXValue() );
setGridX( -1 );
}
+ }
}
int KonqIconViewWidget::gridXValue() const