1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

Little change to fix from previous commit 54e1bfeffa

Set QPalette white background color instead of setting
CSS stylesheet.
This commit is contained in:
nowrep 2012-12-06 22:23:11 +01:00
parent 54e1bfeffa
commit 2dd3f80618
2 changed files with 11 additions and 1 deletions

View File

@ -855,7 +855,7 @@ QUrl MainApplication::userStyleSheet(const QString &filePath) const
// Set default white background for all sites
// Fixes issue with dark themes when sites don't set background
QString userStyle = "html{background-color:white;}";
QString userStyle /*= "body{background-color:white;}"*/;
userStyle += AdBlockManager::instance()->elementHidingRules() + "{ display:none !important;}";
QFile file(filePath);

View File

@ -137,6 +137,16 @@ void WebView::setPage(QWebPage* page)
connect(m_page, SIGNAL(privacyChanged(bool)), this, SIGNAL(privacyChanged(bool)));
mApp->plugins()->emitWebPageCreated(m_page);
/* Set white background by default.
Fixes issue with dark themes.
See #602
*/
QPalette pal = palette();
pal.setBrush(QPalette::Base, Qt::white);
page->setPalette(pal);
}
void WebView::load(const QUrl &url)