aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/macos/ScrollView.qml
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-10-09 13:45:18 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-10-12 16:12:08 +0200
commitcf4cd44d33a819b636f00e2623717ff25250940c (patch)
tree157b9d06595c8db27baac8c8b5ae88f62bd6564e /src/imports/controls/macos/ScrollView.qml
parent88daafb4167f4d095c8e2559eea3bc67259c1900 (diff)
Native style, macOS: add scrollviewcorner
On macOS (Big Sur), when a ScrollView has both a vertical and a horizontal scrollbar, we should draw a corner item between them so that they look 'connected'. Since we don't have a way to draw that item using QStyle, we simply grab a section of the center of a ScrollBar groove, and use that to create a corner item. Change-Id: I4e4df25b6769e810e6b046f6842f4424450fecb3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/macos/ScrollView.qml')
-rw-r--r--src/imports/controls/macos/ScrollView.qml8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/imports/controls/macos/ScrollView.qml b/src/imports/controls/macos/ScrollView.qml
index aced3809..8b38f710 100644
--- a/src/imports/controls/macos/ScrollView.qml
+++ b/src/imports/controls/macos/ScrollView.qml
@@ -37,6 +37,7 @@
import QtQuick
import QtQuick.Controls.impl
import QtQuick.Templates as T
+import QtQuick.NativeStyle as NativeStyle
T.ScrollView {
id: control
@@ -60,6 +61,13 @@ T.ScrollView {
y: control.topPadding
height: control.availableHeight
active: control.ScrollBar.horizontal.active
+
+ NativeStyle.ScrollViewCorner {
+ y: parent.height
+ control: control
+ visible: control.ScrollBar.horizontal.visible
+ useNinePatchImage: false
+ }
}
ScrollBar.horizontal: ScrollBar {