summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/webenginewidgets/browser/browserapplication.cpp1
-rw-r--r--examples/webenginewidgets/browser/settings.cpp4
-rw-r--r--examples/webenginewidgets/browser/settings.ui12
3 files changed, 16 insertions, 1 deletions
diff --git a/examples/webenginewidgets/browser/browserapplication.cpp b/examples/webenginewidgets/browser/browserapplication.cpp
index 9ea9fbfc..14023f6e 100644
--- a/examples/webenginewidgets/browser/browserapplication.cpp
+++ b/examples/webenginewidgets/browser/browserapplication.cpp
@@ -245,6 +245,7 @@ void BrowserApplication::loadSettings()
defaultSettings->setFontSize(QWebEngineSettings::DefaultFixedFontSize, fixedFont.pointSize());
defaultSettings->setAttribute(QWebEngineSettings::JavascriptEnabled, settings.value(QLatin1String("enableJavascript"), true).toBool());
+ defaultSettings->setAttribute(QWebEngineSettings::ScrollAnimatorEnabled, settings.value(QLatin1String("enableScrollAnimator"), true).toBool());
#if defined(QTWEBENGINE_PLUGINS)
defaultSettings->setAttribute(QWebEngineSettings::PluginsEnabled, settings.value(QLatin1String("enablePlugins"), true).toBool());
diff --git a/examples/webenginewidgets/browser/settings.cpp b/examples/webenginewidgets/browser/settings.cpp
index 49b7709e..d89c4935 100644
--- a/examples/webenginewidgets/browser/settings.cpp
+++ b/examples/webenginewidgets/browser/settings.cpp
@@ -87,6 +87,8 @@ void SettingsDialog::loadDefaults()
#if defined(QTWEBENGINE_PLUGINS)
enablePlugins->setChecked(defaultSettings->testAttribute(QWebEngineSettings::PluginsEnabled));
#endif
+
+ enableScrollAnimator->setChecked(defaultSettings->testAttribute(QWebEngineSettings::ScrollAnimatorEnabled));
}
void SettingsDialog::loadFromSettings()
@@ -134,6 +136,7 @@ void SettingsDialog::loadFromSettings()
enableJavascript->setChecked(settings.value(QLatin1String("enableJavascript"), enableJavascript->isChecked()).toBool());
enablePlugins->setChecked(settings.value(QLatin1String("enablePlugins"), enablePlugins->isChecked()).toBool());
userStyleSheet->setText(settings.value(QLatin1String("userStyleSheet")).toUrl().toString());
+ enableScrollAnimator->setChecked(settings.value(QLatin1String("enableScrollAnimator"), enableScrollAnimator->isChecked()).toBool());
settings.endGroup();
#if defined(QWEBENGINEPAGE_SETNETWORKACCESSMANAGER)
@@ -218,6 +221,7 @@ void SettingsDialog::saveToSettings()
settings.setValue(QLatin1String("standardFont"), standardFont);
settings.setValue(QLatin1String("enableJavascript"), enableJavascript->isChecked());
settings.setValue(QLatin1String("enablePlugins"), enablePlugins->isChecked());
+ settings.setValue(QLatin1String("enableScrollAnimator"), enableScrollAnimator->isChecked());
QString userStyleSheetString = userStyleSheet->text();
if (QFile::exists(userStyleSheetString))
settings.setValue(QLatin1String("userStyleSheet"), QUrl::fromLocalFile(userStyleSheetString));
diff --git a/examples/webenginewidgets/browser/settings.ui b/examples/webenginewidgets/browser/settings.ui
index 3491ce0b..08374ca7 100644
--- a/examples/webenginewidgets/browser/settings.ui
+++ b/examples/webenginewidgets/browser/settings.ui
@@ -155,7 +155,17 @@
</item>
</widget>
</item>
- <item row="5" column="1" colspan="2" >
+ <item row="5" column="1" colspan="2">
+ <widget class="QCheckBox" name="enableScrollAnimator" >
+ <property name="text" >
+ <string>Enable Scroll Animator</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1" colspan="2" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>