QtQuick: Port from Text to proper Kirigami.Units

remotes/offline-stg/wilder
Aleix Pol 8 years ago
parent 84854afb64
commit 77dfe3ddc6
  1. 19
      mobile/components/private/PageView.qml

@ -20,6 +20,7 @@
import QtQuick 2.2 import QtQuick 2.2
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import org.kde.okular 2.0 import org.kde.okular 2.0
import org.kde.kirigami 2.2 as Kirigami
Item { Item {
width: parent.width width: parent.width
@ -41,12 +42,6 @@ Item {
document: null document: null
} }
//FIXME: this should use units, but can't depend from plasma from here
Text {
id: unit
text: "M"
visible: false
}
Rectangle { Rectangle {
id: backgroundRectangle id: backgroundRectangle
anchors { anchors {
@ -54,21 +49,21 @@ Item {
bottom: parent.bottom bottom: parent.bottom
left: page.left left: page.left
right: page.right right: page.right
topMargin: -unit.height * 10 topMargin: -Kirigami.Units.gridUnit
bottomMargin: -unit.height * 10 bottomMargin: -Kirigami.Units.gridUnit
} }
z: -1 z: -1
color: "white" color: "white"
LinearGradient { LinearGradient {
width: unit.width width: Kirigami.Units.gridUnit
anchors { anchors {
right: parent.left right: parent.left
top: parent.top top: parent.top
bottom: parent.bottom bottom: parent.bottom
} }
start: Qt.point(0, 0) start: Qt.point(0, 0)
end: Qt.point(unit.width, 0) end: Qt.point(Kirigami.Units.gridUnit, 0)
gradient: Gradient { gradient: Gradient {
GradientStop { GradientStop {
position: 0.0 position: 0.0
@ -86,14 +81,14 @@ Item {
} }
LinearGradient { LinearGradient {
width: unit.width width: Kirigami.Units.gridUnit
anchors { anchors {
left: parent.right left: parent.right
top: parent.top top: parent.top
bottom: parent.bottom bottom: parent.bottom
} }
start: Qt.point(0, 0) start: Qt.point(0, 0)
end: Qt.point(unit.width, 0) end: Qt.point(Kirigami.Units.gridUnit, 0)
gradient: Gradient { gradient: Gradient {
GradientStop { GradientStop {
position: 0.0 position: 0.0

Loading…
Cancel
Save