diff --git a/src/controls/ScrollView.qml b/src/controls/ScrollView.qml index 3ce2054ad4af6aee0cceb100f18e8ec3b191bf77..46692fc10455a386613f2f8f95ad0b2eab7c906a 100644 --- a/src/controls/ScrollView.qml +++ b/src/controls/ScrollView.qml @@ -135,9 +135,9 @@ FocusScope { /*! \internal */ property int __scrollBarTopMargin: 0 /*! \internal */ - property alias horizontalScrollBar: scroller.horizontalScrollBar + property alias __horizontalScrollBar: scroller.horizontalScrollBar /*! \internal */ - property alias verticalScrollBar: scroller.verticalScrollBar + property alias __verticalScrollBar: scroller.verticalScrollBar /*! \internal */ property Component style: Qt.createComponent(Settings.theme() + "/ScrollViewStyle.qml", root) diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml index 0cae59c8755d24b445736436c9450c5b9a86af63..d28f65569efb187ace8f5e240e092f4c5f5119bf 100644 --- a/src/controls/TextArea.qml +++ b/src/controls/TextArea.qml @@ -390,7 +390,7 @@ ScrollView { if (length) string = "\n" + string text += string - verticalScrollBar.value = verticalScrollBar.maximumValue + __verticalScrollBar.value = __verticalScrollBar.maximumValue } /*! @@ -651,10 +651,10 @@ ScrollView { if (!recursionGuard) { recursionGuard = true if (wrapMode == TextEdit.NoWrap) { - horizontalScrollBar.visible = edit.paintedWidth + (2 * documentMargins) > area.viewport.width + __horizontalScrollBar.visible = edit.paintedWidth + (2 * documentMargins) > area.viewport.width edit.width = edit.paintedWidth + (2 * documentMargins) } else { - horizontalScrollBar.visible = false + __horizontalScrollBar.visible = false edit.width = area.viewport.width - (2 * documentMargins) } edit.height = Math.max(area.viewport.height - (2 * documentMargins), paintedHeight + (2 * documentMargins)) @@ -711,9 +711,9 @@ ScrollView { Keys.onPressed: { if (event.key == Qt.Key_PageUp) { - verticalScrollBar.value -= area.height + __verticalScrollBar.value -= area.height } else if (event.key == Qt.Key_PageDown) - verticalScrollBar.value += area.height + __verticalScrollBar.value += area.height } } diff --git a/src/styles/Desktop/ScrollViewStyle.qml b/src/styles/Desktop/ScrollViewStyle.qml index a8c35c14e6f061e4dc51982bb705ffa6eb252afb..5102f19f0dede37fa6e0b449e33ca3a0733597df 100644 --- a/src/styles/Desktop/ScrollViewStyle.qml +++ b/src/styles/Desktop/ScrollViewStyle.qml @@ -51,6 +51,8 @@ Style { property StyleItem __styleitem: StyleItem { elementType: "frame" } + property Component scrollBar: ScrollBar {} + property Component frame: StyleItem { id: styleitem elementType: "frame" diff --git a/src/styles/ScrollViewStyle.qml b/src/styles/ScrollViewStyle.qml index c10e7a864304f8fbdc3ae0377960849479a42b07..ec8c083f90b25e02a8c09e8fe4240eaff4d44f42 100644 --- a/src/styles/ScrollViewStyle.qml +++ b/src/styles/ScrollViewStyle.qml @@ -49,13 +49,13 @@ Style { property int scrollBarSpacing: 4 property int defaultFrameWidth: 1 + property Component scrollBar: ScrollBarStyle{} property Component corner: Rectangle { color: "#ccc" } - property Component frame: Rectangle { color: "white" border.color: "#999" border.width: 1 radius: 1 - visible: frameVisible + visible: control.frameVisible } }