Commit 2b4feba0 authored by Arjen Hiemstra's avatar Arjen Hiemstra Committed by Script Kiddy

ScrollView: Use scrollbar height as bottom padding, not width

Summary:
Apparently I accidentally used the bottom scrollbar width instead of
height. Oops.

Test Plan: ScrollView with horizontal scrollbar no longer hides content

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27280

(cherry picked from commit 6995b4ae)
parent 1626d01b
......@@ -45,7 +45,7 @@ T.ScrollView {
rightPadding: (internal.backgroundVisible && background.hasOwnProperty("rightPadding") ? background.rightPadding : 0)
+ (!LayoutMirroring.enabled ? internal.verticalScrollBarWidth : 0)
bottomPadding: (internal.backgroundVisible && background.hasOwnProperty("bottomPadding") ? background.bottomPadding : 0)
+ internal.horizontalScrollBarWidth
+ internal.horizontalScrollBarHeight
//create a background only after Component.onCompleted, see on the component creation below for explanation
Component.onCompleted: {
......@@ -97,7 +97,7 @@ T.ScrollView {
readonly property bool backgroundVisible: controlRoot.background && controlRoot.background.visible
readonly property real verticalScrollBarWidth: controlRoot.ScrollBar.vertical.visible && !Kirigami.Settings.tabletMode ? controlRoot.ScrollBar.vertical.width : 0
readonly property real horizontalScrollBarWidth: controlRoot.ScrollBar.horizontal.visible && !Kirigami.Settings.tabletMode ? controlRoot.ScrollBar.horizontal.width : 0
readonly property real horizontalScrollBarHeight: controlRoot.ScrollBar.horizontal.visible && !Kirigami.Settings.tabletMode ? controlRoot.ScrollBar.horizontal.height : 0
}
]
ScrollBar.vertical: ScrollBar {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment