diff options
Diffstat (limited to 'src/urlbar/urlbar.cpp')
-rw-r--r-- | src/urlbar/urlbar.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index f11cfdeb..fb98076a 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -61,6 +61,7 @@ IconButton::IconButton(QWidget *parent) setCursor(Qt::ArrowCursor); } + void IconButton::mouseReleaseEvent(QMouseEvent* event) { emit clicked(event->globalPos()); @@ -80,11 +81,6 @@ UrlBar::UrlBar(QWidget *parent) // initial style setStyleSheet(QString("UrlBar { padding: 0 0 0 %1px;} ").arg(_icon->sizeHint().width())); - // cosmetic - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - setMinimumWidth(200); - setMinimumHeight(26); - // doesn't show the clear button setClearButtonShown(false); @@ -363,7 +359,8 @@ IconButton *UrlBar::addRightIcon(UrlBar::icon ic) _rightIconsList << rightIcon; int iconsCount = _rightIconsList.count(); - rightIcon->move(width() - 23*iconsCount, 6); + int iconHeight = (height() - 18) / 2; + rightIcon->move(width() - 23*iconsCount, iconHeight); rightIcon->show(); return rightIcon; @@ -379,7 +376,7 @@ void UrlBar::clearRightIcons() void UrlBar::resizeEvent(QResizeEvent *event) { - int newHeight = (height() - 19) / 2; + int newHeight = (height() - 18) / 2; _icon->move(4, newHeight); int iconsCount = _rightIconsList.count(); |