From 2914530457e441918372226037f8a062e195bf9c Mon Sep 17 00:00:00 2001 From: matgic78 Date: Wed, 19 May 2010 14:28:35 +0200 Subject: Tiny improvements for the appearance of the RSS widget --- src/urlbar/rsswidget.cpp | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'src/urlbar') diff --git a/src/urlbar/rsswidget.cpp b/src/urlbar/rsswidget.cpp index 395d7bab..35095c07 100644 --- a/src/urlbar/rsswidget.cpp +++ b/src/urlbar/rsswidget.cpp @@ -56,26 +56,35 @@ RSSWidget::RSSWidget(const QMap< KUrl, QString > &map, QWidget *parent) , m_map(map) { setAttribute(Qt::WA_DeleteOnClose); - setFixedWidth(250); + + setMinimumWidth(200); setFrameStyle(Panel); QFormLayout *layout = new QFormLayout(this); setLayout(layout); + QLabel *title = new QLabel(this); + title->setText(i18n("

Subscribe to RSS Feeds

")); + layout->addRow(title); + + // Agregators QLabel *agregator = new QLabel(this); agregator->setText(i18n("Aggregator:")); m_agregators = new KComboBox(this); - m_agregators->addItem(KIcon("application-rss+xml"), QString("Akregator")); + m_agregators->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + + m_agregators->addItem(KIcon("akregator"), QString("Akregator")); m_agregators->addItem(Application::icon(KUrl("http://google.com/reader")), i18n("Google Reader")); layout->addRow(agregator, m_agregators); - + // Feeds List QLabel *feed = new QLabel(this); feed->setText(i18n("Feed:")); m_feeds = new KComboBox(this); + m_feeds->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); foreach(const QString &title, m_map) { @@ -84,13 +93,16 @@ RSSWidget::RSSWidget(const QMap< KUrl, QString > &map, QWidget *parent) layout->addRow(feed, m_feeds); - - QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this); - buttonBox->button(QDialogButtonBox::Ok)->setText(i18n("Add Feed")); + // Buttons + QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel, Qt::Horizontal, this); + + QPushButton *addFeed = new QPushButton(KIcon("list-add"), i18n("Add Feed"), buttonBox); + buttonBox->addButton(addFeed, QDialogButtonBox::AcceptRole); + connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); - layout->addWidget(buttonBox); + layout->addRow(buttonBox); } -- cgit v1.2.1