summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2017-07-20 14:45:11 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2017-08-02 13:32:19 +0000
commit6aef365a55bb4fed0c156ebc852e90ca1086c091 (patch)
tree249a98973bf27495dafccbc23f93507c63c988ca /src/core
parent3fdcc80a11bb5320e85cf37e0bfd89cce01e296b (diff)
Add HideScrollbars setting
[ChangeLog][Settings] Added setting to hide scrollbars. Change-Id: I17695bb54a460621358345d303302b93eb342696 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/web_engine_settings.cpp2
-rw-r--r--src/core/web_engine_settings.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index 4be985e0c..fe40298bb 100644
--- a/src/core/web_engine_settings.cpp
+++ b/src/core/web_engine_settings.cpp
@@ -223,6 +223,7 @@ void WebEngineSettings::initDefaults()
s_defaultAttributes.insert(PluginsEnabled, false);
s_defaultAttributes.insert(FullScreenSupportEnabled, false);
s_defaultAttributes.insert(ScreenCaptureEnabled, false);
+ s_defaultAttributes.insert(HideScrollbars, false);
// The following defaults matches logic in render_view_host_impl.cc
// But first we must ensure the WebContext has been initialized
QtWebEngineCore::WebEngineContext::current();
@@ -326,6 +327,7 @@ void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *p
prefs->should_print_backgrounds = testAttribute(PrintElementBackgrounds);
prefs->allow_running_insecure_content = testAttribute(AllowRunningInsecureContent);
prefs->allow_geolocation_on_insecure_origins = testAttribute(AllowGeolocationOnInsecureOrigins);
+ prefs->hide_scrollbars = testAttribute(HideScrollbars);
// Fonts settings.
prefs->standard_font_family_map[content::kCommonScript] = toString16(fontFamily(StandardFont));
diff --git a/src/core/web_engine_settings.h b/src/core/web_engine_settings.h
index 7defb0013..1304d2ae9 100644
--- a/src/core/web_engine_settings.h
+++ b/src/core/web_engine_settings.h
@@ -84,7 +84,8 @@ public:
PrintElementBackgrounds,
AllowRunningInsecureContent,
AllowGeolocationOnInsecureOrigins,
- AllowWindowActivationFromJavaScript
+ AllowWindowActivationFromJavaScript,
+ HideScrollbars
};
// Must match the values from the public API in qwebenginesettings.h.