diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-05-03 17:16:22 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-05-05 19:26:38 +0200 |
commit | e80d466d7e4fd7b08fba2edd36aab8af27706e9c (patch) | |
tree | e8fc54db49bb9b70973bbe8dbab527a8597ffdd4 /kio/kfile | |
parent | a40d90b98203e83af363f6f40ceaac2329ebede5 (diff) | |
download | tdelibs-e80d466d7e4fd7b08fba2edd36aab8af27706e9c.tar.gz tdelibs-e80d466d7e4fd7b08fba2edd36aab8af27706e9c.zip |
Fix incorrect positions and heights in open/save dialogs when nonstandard font sizes are in use
(cherry picked from commit c5463fddb10d24f0dd582765fdaf488075854d61)
Diffstat (limited to 'kio/kfile')
-rw-r--r-- | kio/kfile/kurlbar.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kio/kfile/kurlbar.cpp b/kio/kfile/kurlbar.cpp index ee79b4e58..5a746ed98 100644 --- a/kio/kfile/kurlbar.cpp +++ b/kio/kfile/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); |