From 61419a97cd3677dcf16cc18063bfbcab6c6c0b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Tr=C3=B6scher?= Date: Fri, 9 Sep 2011 21:22:51 +0200 Subject: fix layout of favouriteWidget REVIEWED-BY: trustMe --- src/urlbar/favoritewidget.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'src/urlbar/favoritewidget.cpp') diff --git a/src/urlbar/favoritewidget.cpp b/src/urlbar/favoritewidget.cpp index da97ef65..c3370db9 100644 --- a/src/urlbar/favoritewidget.cpp +++ b/src/urlbar/favoritewidget.cpp @@ -55,21 +55,17 @@ FavoriteWidget::FavoriteWidget(WebTab *tab, QWidget *parent) setAttribute(Qt::WA_DeleteOnClose); setFixedWidth(350); - QVBoxLayout *layout = new QVBoxLayout(this); - - // Title - QLabel *favoriteInfo = new QLabel(this); - favoriteInfo->setText(i18n("

Remove this favorite?

")); - layout->addWidget(favoriteInfo, 0, Qt::AlignCenter); - - QHBoxLayout *hLay = new QHBoxLayout(this); + QFormLayout *layout = new QFormLayout(this); + QVBoxLayout *vLay = new QVBoxLayout(this); // Favorite icon QLabel *bookmarkIcon = new QLabel(this); bookmarkIcon->setPixmap(KIcon("emblem-favorite").pixmap(32, 32)); - hLay->addWidget(bookmarkIcon); - QVBoxLayout *vLay = new QVBoxLayout(this); + // Title + QLabel *favoriteInfo = new QLabel(this); + favoriteInfo->setText(i18n("

Remove this favorite?

")); + vLay->addWidget(favoriteInfo); // Favorite name QLabel *nameLabel = new QLabel(this); @@ -81,8 +77,7 @@ FavoriteWidget::FavoriteWidget(WebTab *tab, QWidget *parent) urlLabel->setText(i18n("URL: %1", m_tab->url().url())); vLay->addWidget(urlLabel); - hLay->addLayout(vLay); - layout->addLayout(hLay); + layout->addRow(bookmarkIcon, vLay); // Ok & Cancel buttons QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this); -- cgit v1.2.1