From 7882cbcc98603ede52feac5d6c4381c547965aa4 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 18 Jun 2013 14:25:37 +0700 Subject: [PATCH 1/2] Set unloaded tab color to rgb(100, 100, 100) --- src/lib/webview/webtab.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/webview/webtab.cpp b/src/lib/webview/webtab.cpp index a5b53a3a5..f89a7bcf2 100644 --- a/src/lib/webview/webtab.cpp +++ b/src/lib/webview/webtab.cpp @@ -269,6 +269,7 @@ void WebTab::restoreTab(const WebTab::SavedTab &tab) m_view->tabWidget()->setTabIcon(index, tab.icon); m_view->tabWidget()->setTabText(index, tab.title); + m_view->tabWidget()->tabBar()->setTabTextColor(index, QColor(100, 100, 100)); m_view->tabWidget()->setTabToolTip(index, tab.title); m_locationBar.data()->showUrl(tab.url); } @@ -343,6 +344,7 @@ void WebTab::showNotification(QWidget* notif) void WebTab::slotRestore() { p_restoreTab(m_savedTab); + m_view->tabWidget()->tabBar()->setTabTextColor(tabIndex(), QColor(0, 0, 0)); m_savedTab.clear(); } From 18f65a66f62ca722d55a583dce7c4f0e0504eaa9 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 18 Jun 2013 14:33:05 +0700 Subject: [PATCH 2/2] Only set the unloaded tab color if the url is not empty --- src/lib/webview/webtab.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/webview/webtab.cpp b/src/lib/webview/webtab.cpp index f89a7bcf2..951891447 100644 --- a/src/lib/webview/webtab.cpp +++ b/src/lib/webview/webtab.cpp @@ -269,7 +269,9 @@ void WebTab::restoreTab(const WebTab::SavedTab &tab) m_view->tabWidget()->setTabIcon(index, tab.icon); m_view->tabWidget()->setTabText(index, tab.title); - m_view->tabWidget()->tabBar()->setTabTextColor(index, QColor(100, 100, 100)); + if (! tab.url.isEmpty()) { + m_view->tabWidget()->tabBar()->setTabTextColor(index, QColor(100, 100, 100)); + } m_view->tabWidget()->setTabToolTip(index, tab.title); m_locationBar.data()->showUrl(tab.url); }