Warning, /plasma/qqc2-breeze-style/style/qtquickcontrols/ScrollView.qml is written in an unsupported language. File is not indexed.

0001 // NOTE: check this
0002 import QtQuick 2.15
0003 import QtQuick.Controls 2.15 as Controls
0004 import QtQuick.Templates 2.15 as T
0005 
0006 T.ScrollView {
0007     id: control
0008     clip: true //TODO: remove with Qt 6
0009 
0010     implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
0011                             contentWidth + leftPadding + rightPadding)
0012     implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
0013                              contentHeight + topPadding + bottomPadding)
0014 
0015     rightPadding: {
0016         if (ScrollBar.vertical
0017             && ScrollBar.vertical.background
0018             && ScrollBar.vertical.background.visible
0019         ) {
0020             return ScrollBar.vertical.background.width
0021         } else {
0022             return horizontalPadding
0023         }
0024     }
0025     bottomPadding: {
0026         if (ScrollBar.horizontal
0027             && ScrollBar.horizontal.background
0028             && ScrollBar.horizontal.background.visible
0029         ) {
0030             return ScrollBar.horizontal.background.height
0031         } else {
0032             return verticalPadding
0033         }
0034     }
0035 
0036     ScrollBar.vertical: ScrollBar {
0037         parent: control
0038         x: control.mirrored ? 0 : control.width - width
0039         y: control.topPadding
0040         height: control.availableHeight
0041         active: control.ScrollBar.horizontal.active
0042     }
0043 
0044     ScrollBar.horizontal: ScrollBar {
0045         parent: control
0046         x: control.leftPadding
0047         y: control.height - height
0048         width: control.availableWidth
0049         active: control.ScrollBar.vertical.active
0050     }
0051 }