From 7fedb0bcaf32ca5cb1de9e4815de08df7098426b Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 9 Apr 2010 02:06:33 +0200 Subject: Fixing icons position and saving a couple of moveEvents --- src/urlbar/lineedit.cpp | 11 +++++++---- src/urlbar/urlbar.cpp | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src/urlbar') diff --git a/src/urlbar/lineedit.cpp b/src/urlbar/lineedit.cpp index 059a0178..09c158fa 100644 --- a/src/urlbar/lineedit.cpp +++ b/src/urlbar/lineedit.cpp @@ -63,10 +63,9 @@ LineEdit::LineEdit(QWidget* parent) // cosmetic setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); setMinimumWidth(200); - setMinimumHeight(20); + setMinimumHeight(26); // initial style - _icon->move(4,6); setStyleSheet( QString("LineEdit { padding: 0 0 0 %1px;} ").arg(_icon->sizeHint().width()) ); // doesn't show the clear button @@ -177,7 +176,8 @@ void LineEdit::clearRightIcons() void LineEdit::resizeEvent(QResizeEvent *event) { - KLineEdit::resizeEvent(event); + int newHeight = ( height() - 19 )/2; + _icon->move(4, newHeight ); int iconsCount = _rightIconsList.count(); int w = width(); @@ -185,6 +185,9 @@ void LineEdit::resizeEvent(QResizeEvent *event) for(int i = 0; i < iconsCount; ++i) { IconButton *bt = _rightIconsList.at(i); - bt->move( w - 23*(i+1), 6); + bt->move( w - 25*(i+1), newHeight ); } + + KLineEdit::resizeEvent(event); + } diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index c5201a1c..adc011f0 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -249,7 +249,10 @@ void UrlBar::loadFinished() return; if(_tab->url().scheme() == QL1S("about") ) + { + update(); return; + } // show KGet downloads?? if(ReKonfig::kgetList()) -- cgit v1.2.1