ScrollView: Do not overlay scrollbars over contents

Authored by ahiemstra on Jan 14 2020, 9:56 AM.

Description

ScrollView: Do not overlay scrollbars over contents

Summary:
This ensures the scrollbar of a ScrollView do not overlap the ScrollView's
contents. It effectively makes ScrollView's behaviour the same as all
widget views, which also do not overlap the contents.

It also removes the need for a lot of workarounds in applications and other
places to fix the overlapping problem.

Test Plan:
Tested with this QML:

import QtQuick 2.12
import QtQuick.Controls 2.12

import org.kde.kirigami 2.11 as Kirigami

Kirigami.ApplicationWindow {
    pageStack.initialPage: Kirigami.Page {
        leftPadding: 0
        rightPadding: 0
        topPadding: 0
        bottomPadding: 0
        ScrollView {
            anchors.fill: parent

            ListView {
                model: 100

                delegate: ItemDelegate {
                    width: ListView.view.width
                    text: modelData
                }
            }
        }
    }
}

Before:

After:

Reviewers: Plasma, Goal: Consistency, mart

Reviewed By: Plasma, mart

Subscribers: kmaterka, mart, ndavis, IlyaBizyaev, ngraham, broulik, plasma-devel

Tags: Plasma

Maniphest Tasks: T9126

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

Details

Committed
ahiemstraJan 14 2020, 9:58 AM
Reviewer
Plasma
Differential Revision
D26530: ScrollView: Do not overlay scrollbars over contents
Parents
R858:24be733ff198: GIT_SILENT Bump KF5 deprecation level to 5.66
Branches
Unknown
Tags
Unknown