Make the add article popup come in from above
This prevents messing up with the virtual keyboard.pull/1/head
parent
c5c6630b8a
commit
2b4b0602a1
|
@ -172,7 +172,7 @@ Page {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: listView.height
|
height: listView.height
|
||||||
x: 0
|
x: 0
|
||||||
y: listView.height
|
y: - height
|
||||||
z: 5
|
z: 5
|
||||||
|
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
|
@ -182,7 +182,7 @@ Page {
|
||||||
target: addArticleContainer
|
target: addArticleContainer
|
||||||
property: "y"
|
property: "y"
|
||||||
to: 0
|
to: 0
|
||||||
duration: 150
|
duration: 500
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -193,31 +193,41 @@ Page {
|
||||||
PropertyAnimation {
|
PropertyAnimation {
|
||||||
target: addArticleContainer
|
target: addArticleContainer
|
||||||
property: "y"
|
property: "y"
|
||||||
to: listView.height
|
to: - addArticleContainer.height
|
||||||
duration: 150
|
duration: 500
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
height: addArticleUrl.height + addArticleUrl.anchors.topMargin + addArticlesButtonRow.height
|
height: addArticleInputContainer.height
|
||||||
width: parent.width
|
width: parent.width
|
||||||
anchors.bottom: parent.bottom
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
color: "black"
|
color: "black"
|
||||||
opacity: 0.9
|
opacity: 0.9
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
height: addArticleUrl.height + addArticleUrl.anchors.topMargin + addArticlesButtonRow.height
|
id: addArticleInputContainer
|
||||||
|
height: addArticleTitle.height + addArticleTitle.anchors.topMargin + addArticleUrl.height + addArticleUrl.anchors.topMargin + addArticlesButtonRow.height
|
||||||
width: parent.width
|
width: parent.width
|
||||||
anchors.bottom: parent.bottom
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: addArticleTitle
|
||||||
|
text: qsTr( "Add article" )
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: Theme.horizontalPageMargin
|
||||||
|
x: Theme.horizontalPageMargin
|
||||||
|
font.pixelSize: Theme.fontSizeLarge
|
||||||
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: addArticleUrl
|
id: addArticleUrl
|
||||||
width: parent.width
|
width: parent.width
|
||||||
anchors.top: parent.top
|
anchors.top: addArticleTitle.bottom
|
||||||
anchors.topMargin: Theme.horizontalPageMargin
|
anchors.topMargin: Theme.horizontalPageMargin
|
||||||
placeholderText: qsTr( "Article URL" )
|
placeholderText: qsTr( "Article URL" )
|
||||||
inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhUrlCharactersOnly
|
inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhUrlCharactersOnly
|
||||||
|
@ -236,6 +246,7 @@ Page {
|
||||||
icon.source: "image://theme/icon-m-dismiss"
|
icon.source: "image://theme/icon-m-dismiss"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
addArticleUrl.focus = false
|
||||||
addArticleUrl.text = ""
|
addArticleUrl.text = ""
|
||||||
hideAddArticleContainer.start()
|
hideAddArticleContainer.start()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue