summaryrefslogtreecommitdiffstats
path: root/tdeio/tdefile/kurlbar.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 /tdeio/tdefile/kurlbar.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 'tdeio/tdefile/kurlbar.cpp')
-rw-r--r--tdeio/tdefile/kurlbar.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tdeio/tdefile/kurlbar.cpp b/tdeio/tdefile/kurlbar.cpp
index 2aa79353f..88b050db4 100644
--- a/tdeio/tdefile/kurlbar.cpp
+++ b/tdeio/tdefile/kurlbar.cpp
@@ -214,10 +214,12 @@ void KURLBarItem::paint( TQPainter *p )
p->drawPixmap( margin, yPos, *pm );
if ( !text().isEmpty() ) {
TQFontMetrics fm = p->fontMetrics();
- if ( pm->height() < fm.height() )
+ if ( pm->height() < fm.height() ) {
yPos = fm.ascent() + fm.leading()/2;
- else
- yPos = pm->height()/2 - fm.height()/2 + fm.ascent();
+ }
+ else {
+ yPos = height(box)/2 - fm.height()/2 + fm.ascent() - margin;
+ }
yPos += margin;
int stringWidth = box->width() - pm->width() - 2 - (margin * 2);