dragonpilot - 基於 openpilot 的開源駕駛輔助系統
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
1.1 KiB

import QtQuick 2.0
Item {
id: root
signal scroll()
Flickable {
id: flickArea
objectName: "flickArea"
anchors.fill: parent
contentHeight: helpText.height
contentWidth: width - (leftMargin + rightMargin)
bottomMargin: 50
topMargin: 50
rightMargin: 50
leftMargin: 50
flickableDirection: Flickable.VerticalFlick
flickDeceleration: 7500.0
maximumFlickVelocity: 10000.0
pixelAligned: true
onAtYEndChanged: root.scroll()
Text {
id: helpText
width: flickArea.contentWidth
font.family: "Inter"
font.weight: "Light"
font.pixelSize: 50
textFormat: Text.RichText
color: "#C9C9C9"
wrapMode: Text.Wrap
text: text_view
}
}
Rectangle {
id: scrollbar
anchors.right: flickArea.right
anchors.rightMargin: 20
y: flickArea.topMargin + flickArea.visibleArea.yPosition * (flickArea.height - flickArea.bottomMargin - flickArea.topMargin)
width: 12
radius: 6
height: flickArea.visibleArea.heightRatio * (flickArea.height - flickArea.bottomMargin - flickArea.topMargin)
color: "#808080"
}
}