diff options
Diffstat (limited to 'src/urlbar/lineedit.cpp')
-rw-r--r-- | src/urlbar/lineedit.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/urlbar/lineedit.cpp b/src/urlbar/lineedit.cpp index 8e689a46..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 @@ -143,13 +142,16 @@ IconButton *LineEdit::addRightIcon(LineEdit::icon ic) switch(ic) { case LineEdit::KGet: - rightIcon->setIcon( QIcon(KStandardDirs::locate("data", "rekonq/pics/kget-icon.png")) ); + rightIcon->setIcon( KIcon("download") ); + rightIcon->setToolTip( i18n("List all links with KGet") ); break; case LineEdit::RSS: - rightIcon->setIcon( QIcon(KStandardDirs::locate("data", "rekonq/pics/rss-icon.png")) ); + rightIcon->setIcon( KIcon("application-rss+xml") ); + rightIcon->setToolTip( i18n("List all available RSS feeds") ); break; case LineEdit::SSL: - rightIcon->setIcon( QIcon(KStandardDirs::locate("data", "rekonq/pics/ssl-icon.png")) ); + rightIcon->setIcon( KIcon("object-locked") ); + rightIcon->setToolTip( i18n("Show SSL Infos") ); break; default: kDebug() << "ERROR.. default non extant case!!"; @@ -174,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(); @@ -182,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); + } |