From e8cbbaa832df71c57526c9579aeb687951e5a801 Mon Sep 17 00:00:00 2001 From: Alexander Bilyak Date: Thu, 17 Dec 2020 17:05:47 +0100 Subject: [PATCH] Make vertical scroll bar at settings tab always active --- .../frontend/qml/BridgeUI/SettingsView.qml | 18 ++++++++++++++++++ .../qml/ImportExportUI/SettingsView.qml | 18 ++++++++++++++++++ unreleased.md | 1 + 3 files changed, 37 insertions(+) diff --git a/internal/frontend/qml/BridgeUI/SettingsView.qml b/internal/frontend/qml/BridgeUI/SettingsView.qml index 869cf5da..41f2ef80 100644 --- a/internal/frontend/qml/BridgeUI/SettingsView.qml +++ b/internal/frontend/qml/BridgeUI/SettingsView.qml @@ -36,6 +36,24 @@ Item { color: Style.main.background } + // horizontall scrollbar sometimes showes up when vertical scrollbar coveres content + ScrollBar.horizontal.policy: ScrollBar.AlwaysOff + ScrollBar.vertical.policy: ScrollBar.AsNeeded + + // keeping vertical scrollbar allways visible when needed + Connections { + target: wrapper.ScrollBar.vertical + onSizeChanged: { + // ScrollBar.size == 0 at creating so no need to make it active + if (wrapper.ScrollBar.vertical.size < 1.0 && wrapper.ScrollBar.vertical.size > 0 && !wrapper.ScrollBar.vertical.active) { + wrapper.ScrollBar.vertical.active = true + } + } + onActiveChanged: { + wrapper.ScrollBar.vertical.active = true + } + } + // content Column { anchors.left : parent.left diff --git a/internal/frontend/qml/ImportExportUI/SettingsView.qml b/internal/frontend/qml/ImportExportUI/SettingsView.qml index 5e115fea..13702bac 100644 --- a/internal/frontend/qml/ImportExportUI/SettingsView.qml +++ b/internal/frontend/qml/ImportExportUI/SettingsView.qml @@ -32,6 +32,24 @@ Item { height: parent.height color: Style.main.background + // horizontall scrollbar sometimes showes up when vertical scrollbar coveres content + ScrollBar.horizontal.policy: ScrollBar.AlwaysOff + ScrollBar.vertical.policy: ScrollBar.AsNeeded + + // keeping vertical scrollbar allways visible when needed + Connections { + target: wrapper.ScrollBar.vertical + onSizeChanged: { + // ScrollBar.size == 0 at creating so no need to make it active + if (wrapper.ScrollBar.vertical.size < 1.0 && wrapper.ScrollBar.vertical.size > 0 && !wrapper.ScrollBar.vertical.active) { + wrapper.ScrollBar.vertical.active = true + } + } + onActiveChanged: { + wrapper.ScrollBar.vertical.active = true + } + } + // content Column { anchors.left : parent.left diff --git a/unreleased.md b/unreleased.md index e2033e80..539dfd39 100644 --- a/unreleased.md +++ b/unreleased.md @@ -20,6 +20,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/) * GODT-854 EXPUNGE and FETCH unilateral responses are returned before OK EXPUNGE or OK STORE, respectively. * GODT-806 Changed GUI dialog on manual update. Added autoupdates checkbox. Simplifyed installation process GUI. * Bump gopenpgp dependency to v2.1.3 for improved memory usage. +* GODT-912 Changed scroll bar behaviour in settings tab ### Removed