diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-07-28 22:41:37 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-07-28 22:41:37 +0200 |
commit | 3603173d242138550997cbc084f21883b97aa4e2 (patch) | |
tree | 9a912ec2f46462c6b565043c19f3a79e7a5e016d | |
parent | Merge branch 'CLEAR' (diff) | |
parent | Removed Web Inspecting color (diff) | |
download | rekonq-3603173d242138550997cbc084f21883b97aa4e2.tar.xz |
Merge branch 'PrivateColor'
-rw-r--r-- | src/mainwindow.cpp | 10 | ||||
-rw-r--r-- | src/urlbar.cpp | 6 | ||||
-rw-r--r-- | src/urlbar.h | 1 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9a1ea708..a862ee95 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -67,8 +67,6 @@ #include <kdeprintdialog.h> - - // Qt Includes #include <QtCore/QTimer> #include <QtCore/QRect> @@ -590,6 +588,7 @@ void MainWindow::slotPrivateBrowsing(bool enable) if (button == KMessageBox::Yes) { settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, true); + m_view->currentUrlBar()->setBackgroundColor(Qt::lightGray); // palette().color(QPalette::Active, QPalette::Background)); } else { @@ -599,10 +598,11 @@ void MainWindow::slotPrivateBrowsing(bool enable) else { settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, false); + m_view->currentUrlBar()->setBackgroundColor(palette().color(QPalette::Active, QPalette::Base)); - MainWindow* win = Application::instance()->mainWindow(); - win->m_lastSearch.clear(); - win->mainView()->clear(); + m_lastSearch.clear(); + m_view->clear(); + m_view->slotReloadAllTabs(); } } diff --git a/src/urlbar.cpp b/src/urlbar.cpp index af336e1c..ba9773db 100644 --- a/src/urlbar.cpp +++ b/src/urlbar.cpp @@ -258,3 +258,9 @@ QLinearGradient UrlBar::generateGradient(const QColor &color, int height) gradient.setColorAt(1, base); return gradient; } + +void UrlBar::setBackgroundColor(QColor c) +{ + s_defaultBaseColor=c; + repaint(); +}
\ No newline at end of file diff --git a/src/urlbar.h b/src/urlbar.h index 24fea38f..a943c916 100644 --- a/src/urlbar.h +++ b/src/urlbar.h @@ -52,6 +52,7 @@ public: void selectAll() const; KUrl url() const; QSize sizeHint() const; + void setBackgroundColor(QColor); signals: void activated(const KUrl&); |