diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/application.cpp | 4 | ||||
-rw-r--r-- | src/data/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/data/default.css | 10 | ||||
-rw-r--r-- | src/webview.cpp | 17 |
4 files changed, 17 insertions, 15 deletions
diff --git a/src/application.cpp b/src/application.cpp index 94a89c90..366191f4 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -525,9 +525,7 @@ void Application::updateConfiguration() // Applies user defined CSS to all open webpages. If there no longer is a // user defined CSS removes it from all open webpages. - if (ReKonfig::userCSS().isEmpty()) - defaultSettings->setUserStyleSheetUrl(KUrl(KStandardDirs::locate("appdata" , "default.css"))); - else + if (!ReKonfig::userCSS().isEmpty()) defaultSettings->setUserStyleSheetUrl(ReKonfig::userCSS()); // ====== load Settings on main classes diff --git a/src/data/CMakeLists.txt b/src/data/CMakeLists.txt index ef777c9c..5f0ac164 100644 --- a/src/data/CMakeLists.txt +++ b/src/data/CMakeLists.txt @@ -9,7 +9,6 @@ INSTALL( INSTALL( FILES defaultbookmarks.xbel - default.css DESTINATION ${DATA_INSTALL_DIR}/rekonq ) diff --git a/src/data/default.css b/src/data/default.css deleted file mode 100644 index 3ddd3026..00000000 --- a/src/data/default.css +++ /dev/null @@ -1,10 +0,0 @@ -/* -rekonq default css properties -this file will not be considered -setting a local stylesheet in rekonq config -*/ - -/* Set background color to white for sites forgetting this */ -body{ -background-color:#FFFFFF; -}
\ No newline at end of file diff --git a/src/webview.cpp b/src/webview.cpp index 0633bc9b..7fc1b4b8 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -57,6 +57,7 @@ #include <QtGui/QClipboard> #include <QtGui/QKeyEvent> #include <QtGui/QLayout> +#include <QtGui/QWindowsStyle> #include <QtDBus/QDBusConnectionInterface> #include <QtDBus/QDBusInterface> @@ -74,7 +75,21 @@ WebView::WebView(QWidget* parent) { WebPage *page = new WebPage(this); setPage(page); - + + // // NOTE This is a lot hackish. We copied it from Arora, but using a "Windows Style" + // // seems really a pity to me. The problem is that using a KStyle everything seems "broken" + // // (at least with dark colors). So I think the code should be somthing like: + // KStyle s; + // setPalette( s.standardPalette() ); + // // But it doesn't work :( + // // We'll see in next KDE releases... + QPalette p; + if (p.color(QPalette::Window) != Qt::white) { + QWindowsStyle s; + p = s.standardPalette(); + setPalette(p); + } + // download system connect(this, SIGNAL(linkShiftClicked(const KUrl &)), page, SLOT(downloadUrl(const KUrl &))); connect(page, SIGNAL(downloadRequested(const QNetworkRequest &)), page, SLOT(downloadRequest(const QNetworkRequest &))); |