summaryrefslogtreecommitdiff
path: root/src/urlbar
diff options
context:
space:
mode:
Diffstat (limited to 'src/urlbar')
-rw-r--r--src/urlbar/listitem.cpp11
-rw-r--r--src/urlbar/rsswidget.cpp5
2 files changed, 14 insertions, 2 deletions
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp
index f91840d2..5254c7dc 100644
--- a/src/urlbar/listitem.cpp
+++ b/src/urlbar/listitem.cpp
@@ -220,7 +220,16 @@ PreviewListItem::PreviewListItem(const UrlSearchItem &item, const QString &text,
QVBoxLayout *vLayout = new QVBoxLayout;
vLayout->setMargin(0);
- vLayout->addWidget(new TextLabel(item.title, text, this));
+
+ QString title = item.title;
+ if (title.isEmpty())
+ {
+ title = item.url.url();
+ title = title.remove("http://");
+ title.truncate(title.indexOf("/"));
+ }
+
+ vLayout->addWidget(new TextLabel(title, text, this));
vLayout->addWidget(new TextLabel("<i>" + item.url.url() + "</i>", text, this));
hLayout->addLayout(vLayout);
diff --git a/src/urlbar/rsswidget.cpp b/src/urlbar/rsswidget.cpp
index 35095c07..ae96dfae 100644
--- a/src/urlbar/rsswidget.cpp
+++ b/src/urlbar/rsswidget.cpp
@@ -115,9 +115,12 @@ RSSWidget::~RSSWidget()
void RSSWidget::showAt(const QPoint &pos)
{
+ adjustSize();
+
QPoint p;
- p.setX(pos.x() - 200);
+ p.setX(pos.x() - width());
p.setY(pos.y() + 10);
+
move(p);
show();
}