Commit 9906bc68 authored by Chupligin Sergey's avatar Chupligin Sergey

[ListView] add scaling

parent b08594ec
...@@ -15,18 +15,18 @@ ListView { ...@@ -15,18 +15,18 @@ ListView {
id: sectionHeading id: sectionHeading
Rectangle { Rectangle {
width: listView.width width: listView.width
height: 44 height: size.dp(44)
color: "black" color: "black"
Text { Text {
id: sectionText id: sectionText
text: section text: section
font.capitalization: Font.AllUppercase font.capitalization: Font.AllUppercase
font.pixelSize: 20 font.pixelSize: size.dp(20)
color: "white" color: "white"
anchors{ anchors{
left: parent.left left: parent.left
leftMargin: 10 leftMargin: size.dp(10)
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
} }
...@@ -35,10 +35,10 @@ ListView { ...@@ -35,10 +35,10 @@ ListView {
id: line id: line
height: 1 height: 1
color: "white" color: "white"
width: listView.width-sectionText.width-30 width: listView.width-sectionText.width-size.dp(30)
anchors{ anchors{
left: sectionText.right left: sectionText.right
leftMargin: 10 leftMargin: size.dp(10)
verticalCenter: sectionText.verticalCenter verticalCenter: sectionText.verticalCenter
} }
} }
...@@ -48,7 +48,7 @@ ListView { ...@@ -48,7 +48,7 @@ ListView {
Item{ Item{
id: bottom id: bottom
width: parent.width width: parent.width
height: 30 height: size.dp(30)
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
visible: listView.contentHeight > listView.height visible: listView.contentHeight > listView.height
...@@ -56,7 +56,7 @@ ListView { ...@@ -56,7 +56,7 @@ ListView {
LinearGradient{ LinearGradient{
anchors.fill: parent anchors.fill: parent
start: Qt.point(0, 0) start: Qt.point(0, 0)
end: Qt.point(0, 30) end: Qt.point(0, size.dp(30))
gradient: Gradient { gradient: Gradient {
GradientStop { position: 0.0; color: "transparent" } GradientStop { position: 0.0; color: "transparent" }
GradientStop { position: 1.0; color: "black" } GradientStop { position: 1.0; color: "black" }
...@@ -70,13 +70,13 @@ ListView { ...@@ -70,13 +70,13 @@ ListView {
visible: (listView.showDecorator && listView.contentHeight > listView.height) visible: (listView.showDecorator && listView.contentHeight > listView.height)
color: "#0091e5" color: "#0091e5"
width: 5 width: size.dp(5)
height: listView.height*listView.height/listView.contentHeight height: listView.height*listView.height/listView.contentHeight
y: (listView.height)/listView.contentHeight*listView.contentY y: (listView.height)/listView.contentHeight*listView.contentY
anchors{ anchors{
right: listView.right right: listView.right
rightMargin: 4 rightMargin: size.dp(4)
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment