diff options
author | Viktor Engelmann <viktor.engelmann@qt.io> | 2017-09-18 15:57:24 +0200 |
---|---|---|
committer | Viktor Engelmann <viktor.engelmann@qt.io> | 2017-09-20 10:25:22 +0000 |
commit | c9b3baa2e2825df6b06e7366d154341f73d4e326 (patch) | |
tree | be5766b57016b87b981d1088c05357802331e2a4 /src/core | |
parent | d8f18e2b918e2f7c8149d3e6cd1510b27bde7dfd (diff) |
Replace Setting HideScrollbars by ShowScrollBars
Positive options are more intuitive and make for a better API.
Task-number: QTBUG-63179
Change-Id: I632ee768dba52554e7d37d9da84661a1d01f1f37
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/web_engine_settings.cpp | 4 | ||||
-rw-r--r-- | src/core/web_engine_settings.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp index 4c944892a..498c4e799 100644 --- a/src/core/web_engine_settings.cpp +++ b/src/core/web_engine_settings.cpp @@ -231,7 +231,7 @@ void WebEngineSettings::initDefaults() s_defaultAttributes.insert(PluginsEnabled, false); s_defaultAttributes.insert(FullScreenSupportEnabled, false); s_defaultAttributes.insert(ScreenCaptureEnabled, false); - s_defaultAttributes.insert(HideScrollbars, false); + s_defaultAttributes.insert(ShowScrollBars, true); // The following defaults matches logic in render_view_host_impl.cc // But first we must ensure the WebContext has been initialized QtWebEngineCore::WebEngineContext::current(); @@ -334,7 +334,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); + prefs->hide_scrollbars = !testAttribute(ShowScrollBars); // 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 639d314f3..18963344a 100644 --- a/src/core/web_engine_settings.h +++ b/src/core/web_engine_settings.h @@ -85,7 +85,7 @@ public: AllowRunningInsecureContent, AllowGeolocationOnInsecureOrigins, AllowWindowActivationFromJavaScript, - HideScrollbars + ShowScrollBars }; // Must match the values from the public API in qwebenginesettings.h. |