From cbf4a9813af55ecc3bf817240be0e43368fffa8b Mon Sep 17 00:00:00 2001 From: nowrep Date: Mon, 4 Apr 2011 17:03:41 +0200 Subject: [PATCH] Setting fixed width of site address on site info dialog --- src/webview/siteinfo.ui | 6 ++++++ src/webview/webview.cpp | 9 +++++++++ src/webview/webview.h | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/webview/siteinfo.ui b/src/webview/siteinfo.ui index f68bd55cf..669948124 100644 --- a/src/webview/siteinfo.ui +++ b/src/webview/siteinfo.ui @@ -161,6 +161,12 @@ 0 + + + 460 + 16777215 + + diff --git a/src/webview/webview.cpp b/src/webview/webview.cpp index 8b0be11c3..3ccde8dc6 100644 --- a/src/webview/webview.cpp +++ b/src/webview/webview.cpp @@ -243,6 +243,15 @@ void WebView::iconChanged() emit siteIconChanged(); } +QIcon WebView::siteIcon() +{ + if (!m_siteIcon.isNull()) + return m_siteIcon; + if (!icon().isNull()) + return icon(); + return LocationBar::icon(url()); +} + void WebView::linkHovered(const QString &link, const QString &title, const QString &content) { Q_UNUSED(title); diff --git a/src/webview/webview.h b/src/webview/webview.h index 61c00875a..b5e3b6783 100644 --- a/src/webview/webview.h +++ b/src/webview/webview.h @@ -53,7 +53,7 @@ public: WebPage* webPage() const; QString getIp() { return m_currentIp; } QLabel* animationLoading(int index, bool addMovie); - QIcon siteIcon() { return (m_siteIcon.isNull() ? icon() : m_siteIcon); } + QIcon siteIcon(); void addNotification(QWidget* notif); bool hasRss() { return !m_rss.isEmpty(); } QList > getRss() { return m_rss; }