summaryrefslogtreecommitdiff
path: root/src/urlbar/urlbar.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-05-14 19:56:26 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-05-14 19:56:26 +0200
commit0576f6b1542b80963afa20227c7fe53e53f111e8 (patch)
treefa091938cf5f60f7a12a089eac35f4987fd15c1d /src/urlbar/urlbar.cpp
parentShow faster url to load (diff)
downloadrekonq-0576f6b1542b80963afa20227c7fe53e53f111e8.tar.xz
This commit reintroduces the QStackedWidget class for urlbars and let
us resize them as needed for themes different from oxygen. This anyway seems working better with the upcoming Qt 4.7
Diffstat (limited to 'src/urlbar/urlbar.cpp')
-rw-r--r--src/urlbar/urlbar.cpp11
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();