diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 90155b00b..86ff36882 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -876,6 +876,7 @@ void MainApplication::loadSettings() webSettings->setAttribute(QWebEngineSettings::JavascriptCanAccessClipboard, settings.value("allowJavaScriptAccessClipboard", true).toBool()); webSettings->setAttribute(QWebEngineSettings::LinksIncludedInFocusChain, settings.value("IncludeLinkInFocusChain", false).toBool()); webSettings->setAttribute(QWebEngineSettings::XSSAuditingEnabled, settings.value("XSSAuditing", false).toBool()); + webSettings->setAttribute(QWebEngineSettings::PrintElementBackgrounds, settings.value("PrintElementBackground", true).toBool()); webSettings->setAttribute(QWebEngineSettings::SpatialNavigationEnabled, settings.value("SpatialNavigation", false).toBool()); webSettings->setAttribute(QWebEngineSettings::ScrollAnimatorEnabled, settings.value("AnimateScrolling", true).toBool()); webSettings->setAttribute(QWebEngineSettings::HyperlinkAuditingEnabled, false); diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp index e19f9a945..b1c87fffb 100644 --- a/src/lib/preferences/preferences.cpp +++ b/src/lib/preferences/preferences.cpp @@ -277,6 +277,7 @@ Preferences::Preferences(BrowserWindow* window) ui->animateScrolling->setChecked(settings.value("AnimateScrolling", true).toBool()); ui->wheelScroll->setValue(settings.value("wheelScrollLines", qApp->wheelScrollLines()).toInt()); ui->xssAuditing->setChecked(settings.value("XSSAuditing", false).toBool()); + ui->printEBackground->setChecked(settings.value("PrintElementBackground", true).toBool()); ui->useNativeScrollbars->setChecked(settings.value("UseNativeScrollbars", true).toBool()); foreach (int level, WebView::zoomLevels()) { @@ -951,6 +952,7 @@ void Preferences::saveSettings() settings.setValue("LoadTabsOnActivation", ui->dontLoadTabsUntilSelected->isChecked()); settings.setValue("DefaultZoomLevel", ui->defaultZoomLevel->currentIndex()); settings.setValue("XSSAuditing", ui->xssAuditing->isChecked()); + settings.setValue("PrintElementBackground", ui->printEBackground->isChecked()); settings.setValue("closeAppWithCtrlQ", ui->closeAppWithCtrlQ->isChecked()); settings.setValue("UseNativeScrollbars", ui->useNativeScrollbars->isChecked()); #ifdef Q_OS_WIN diff --git a/src/lib/preferences/preferences.ui b/src/lib/preferences/preferences.ui index f2d3df085..ae5509130 100644 --- a/src/lib/preferences/preferences.ui +++ b/src/lib/preferences/preferences.ui @@ -1103,6 +1103,13 @@ + + + + Print element background + + +