mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +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:
parent
54e1bfeffa
commit
2dd3f80618
@ -855,7 +855,7 @@ QUrl MainApplication::userStyleSheet(const QString &filePath) const
|
|||||||
// Set default white background for all sites
|
// Set default white background for all sites
|
||||||
// Fixes issue with dark themes when sites don't set background
|
// 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;}";
|
userStyle += AdBlockManager::instance()->elementHidingRules() + "{ display:none !important;}";
|
||||||
|
|
||||||
QFile file(filePath);
|
QFile file(filePath);
|
||||||
|
@ -137,6 +137,16 @@ void WebView::setPage(QWebPage* page)
|
|||||||
connect(m_page, SIGNAL(privacyChanged(bool)), this, SIGNAL(privacyChanged(bool)));
|
connect(m_page, SIGNAL(privacyChanged(bool)), this, SIGNAL(privacyChanged(bool)));
|
||||||
|
|
||||||
mApp->plugins()->emitWebPageCreated(m_page);
|
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)
|
void WebView::load(const QUrl &url)
|
||||||
|
Loading…
Reference in New Issue
Block a user