mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Revert "Add new option "Ignore system colors" for dark themes."
This reverts commit 4b2fd86fdd
.
This commit is contained in:
parent
4b2fd86fdd
commit
b97d1eeef5
|
@ -399,10 +399,8 @@ void MainApplication::loadSettings()
|
|||
m_websettings->setAttribute(QWebSettings::JavascriptCanCloseWindows, settings.value("allowJavaScriptCloseWindow", false).toBool());
|
||||
#endif
|
||||
|
||||
const QUrl &styleSheet = userStyleSheet(settings.value("userStyleSheet", QString()).toString(),
|
||||
settings.value("ignoreSystemColors", false).toBool());
|
||||
m_websettings->setUserStyleSheetUrl(styleSheet);
|
||||
setWheelScrollLines(settings.value("wheelScrollLines", wheelScrollLines()).toInt());
|
||||
m_websettings->setUserStyleSheetUrl(userStyleSheet(settings.value("userStyleSheet", QString()).toString()));
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup("Browser-Fonts");
|
||||
|
@ -836,8 +834,7 @@ void MainApplication::reloadUserStyleSheet()
|
|||
{
|
||||
Settings settings;
|
||||
settings.beginGroup("Web-Browser-Settings");
|
||||
m_websettings->setUserStyleSheetUrl(userStyleSheet(settings.value("userStyleSheet", QString()).toString(),
|
||||
settings.value("ignoreSystemColors", false).toBool()));
|
||||
m_websettings->setUserStyleSheetUrl(userStyleSheet(settings.value("userStyleSheet", QString()).toString()));
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
|
@ -883,18 +880,11 @@ RegisterQAppAssociation* MainApplication::associationManager()
|
|||
}
|
||||
#endif
|
||||
|
||||
QUrl MainApplication::userStyleSheet(const QString &filePath, bool ignoreSystemColors) const
|
||||
QUrl MainApplication::userStyleSheet(const QString &filePath) const
|
||||
{
|
||||
QString userStyle;
|
||||
|
||||
if (ignoreSystemColors) {
|
||||
// Set default white background for all sites
|
||||
// Fixes issue with dark themes when sites don't set background
|
||||
// But it also brings issues with background of iframes that assumes
|
||||
// background will by default will be transparent
|
||||
userStyle += "html{background-color:white;}";
|
||||
}
|
||||
|
||||
// Set default white background for all sites
|
||||
// Fixes issue with dark themes when sites don't set background
|
||||
QString userStyle = "html{background-color:white;}";
|
||||
userStyle += AdBlockManager::instance()->elementHidingRules() + "{ display:none !important;}";
|
||||
|
||||
QFile file(filePath);
|
||||
|
|
|
@ -148,7 +148,7 @@ private:
|
|||
void translateApp();
|
||||
void restoreOtherWindows();
|
||||
|
||||
QUrl userStyleSheet(const QString &filePath, bool ignoreSystemColors) const;
|
||||
QUrl userStyleSheet(const QString &filePath) const;
|
||||
|
||||
CookieManager* m_cookiemanager;
|
||||
BrowsingLibrary* m_browsingLibrary;
|
||||
|
|
|
@ -253,7 +253,6 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
|
|||
ui->wheelScroll->setValue(settings.value("wheelScrollLines", qApp->wheelScrollLines()).toInt());
|
||||
ui->defaultZoom->setValue(settings.value("DefaultZoom", 100).toInt());
|
||||
ui->xssAuditing->setChecked(settings.value("XSSAuditing", false).toBool());
|
||||
ui->ignoreSystemColors->setChecked(settings.value("ignoreSystemColors", false).toBool());
|
||||
|
||||
//Cache
|
||||
ui->pagesInCache->setValue(settings.value("maximumCachedPages", 3).toInt());
|
||||
|
@ -899,7 +898,6 @@ void Preferences::saveSettings()
|
|||
settings.setValue("LoadTabsOnActivation", ui->dontLoadTabsUntilSelected->isChecked());
|
||||
settings.setValue("DefaultZoom", ui->defaultZoom->value());
|
||||
settings.setValue("XSSAuditing", ui->xssAuditing->isChecked());
|
||||
settings.setValue("ignoreSystemColors", ui->ignoreSystemColors->isChecked());
|
||||
#ifdef Q_OS_WIN
|
||||
settings.setValue("CheckDefaultBrowser", ui->checkDefaultBrowser->isChecked());
|
||||
#endif
|
||||
|
|
|
@ -596,11 +596,11 @@
|
|||
<item row="9" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string><b>Colors<b/></string>
|
||||
<string><b>Background<b/></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<item row="11" column="1">
|
||||
<spacer name="verticalSpacer_12">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
@ -641,13 +641,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QCheckBox" name="ignoreSystemColors">
|
||||
<property name="text">
|
||||
<string>Ignore system colors (for dark themes)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
Loading…
Reference in New Issue
Block a user