summaryrefslogtreecommitdiffstats
path: root/tdeui/kiconview.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-05-03 17:16:22 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-05-03 17:16:22 -0500
commitc5463fddb10d24f0dd582765fdaf488075854d61 (patch)
tree3ea67b31bf6f7c4d9aef24fd3978a93aae55e54a /tdeui/kiconview.cpp
parent857fae6c4fb0f21c49b13f53bb4d3290305f9165 (diff)
downloadtdelibs-c5463fddb10d24f0dd582765fdaf488075854d61.tar.gz
tdelibs-c5463fddb10d24f0dd582765fdaf488075854d61.zip
Fix incorrect positions and heights in open/save dialogs when nonstandard font sizes are in use
Diffstat (limited to 'tdeui/kiconview.cpp')
-rw-r--r--tdeui/kiconview.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tdeui/kiconview.cpp b/tdeui/kiconview.cpp
index 8e9624db9..cd19f4030 100644
--- a/tdeui/kiconview.cpp
+++ b/tdeui/kiconview.cpp
@@ -540,18 +540,18 @@ void TDEIconViewItem::calcRect( const TQString& text_ )
tw = view->maxItemWidth() - ( view->itemTextPos() == TQIconView::Bottom ? 0 :
itemIconRect.width() );
}
-
+
TQFontMetrics *fm = view->itemFontMetrics();
TQString t;
TQRect r;
-
+
// When is text_ set ? Doesn't look like it's ever set.
t = text_.isEmpty() ? text() : text_;
-
+
// Max text height
int nbLines = static_cast<TDEIconView*>( iconView() )->iconTextHeight();
int height = nbLines > 0 ? fm->height() * nbLines : 0xFFFFFFFF;
-
+
// Should not be higher than pixmap if text is alongside icons
if ( view->itemTextPos() != TQIconView::Bottom ) {
if ( d && !d->m_pixmapSize.isNull() )
@@ -560,7 +560,7 @@ void TDEIconViewItem::calcRect( const TQString& text_ )
height = QMIN( itemIconRect.height(), height );
height = QMAX( height, fm->height() );
}
-
+
// Calculate the word-wrap
TQRect outerRect( 0, 0, tw - 6, height );
m_wordWrap = KWordWrap::formatText( *fm, outerRect, 0, t );
@@ -634,8 +634,8 @@ void TDEIconViewItem::calcRect( const TQString& text_ )
}
if ( ( itemIconRect.height() <= 20 ) && ( itemTextRect.height() < itemIconRect.height() ) ) {
d->realTextHeight = itemTextRect.height();
- itemTextRect.setHeight( itemIconRect.height() - 2 );
itemTextRect.setY( itemIconRect.y() );
+ itemTextRect.setHeight( itemIconRect.height() - 2 );
}
}