mirror of
https://github.com/seiichiro0185/sailotp.git
synced 2024-11-14 21:16:42 +00:00
Move PullDownMenu
into the SilicaListView
A `SilicaListView` will properly handle a child `PullDownMenu`. It was previously working when it was the child of a `SilicaFlickable`, but since it was replaced by a `Column` it was not usable anymore. Attaching the `PullDownMenu` to the `SilicaListView` instead of the `SilicaFlickable`, it is properly hidden when the list of OTP is scroll down and the menu cannot be operated by scrolling down.
This commit is contained in:
parent
eb12a09f19
commit
3a7c2d83f5
1 changed files with 20 additions and 21 deletions
|
@ -104,33 +104,32 @@ Page {
|
||||||
Column {
|
Column {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
PullDownMenu {
|
|
||||||
MenuItem {
|
|
||||||
text: qsTr("About")
|
|
||||||
onClicked: pageStack.push(Qt.resolvedUrl("About.qml"))
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
text: qsTr("Settings")
|
|
||||||
visible: true
|
|
||||||
onClicked: pageStack.push(Qt.resolvedUrl("Settings.qml"))
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
text: qsTr("Export / Import")
|
|
||||||
onClicked: pageStack.push(Qt.resolvedUrl("ExportPage.qml"), {parentPage: mainPage, mode: "export"})
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
text: qsTr("Add Token")
|
|
||||||
onClicked: pageStack.push(Qt.resolvedUrl("ScanOTP.qml"), {parentPage: mainPage})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SilicaListView {
|
SilicaListView {
|
||||||
id: otpList
|
id: otpList
|
||||||
model: appWin.listModel
|
model: appWin.listModel
|
||||||
height: parent.height - updateProgress.height - searchField.height
|
height: parent.height - updateProgress.height - searchField.height
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
|
PullDownMenu {
|
||||||
|
MenuItem {
|
||||||
|
text: qsTr("About")
|
||||||
|
onClicked: pageStack.push(Qt.resolvedUrl("About.qml"))
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
text: qsTr("Settings")
|
||||||
|
visible: true
|
||||||
|
onClicked: pageStack.push(Qt.resolvedUrl("Settings.qml"))
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
text: qsTr("Export / Import")
|
||||||
|
onClicked: pageStack.push(Qt.resolvedUrl("ExportPage.qml"), {parentPage: mainPage, mode: "export"})
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
text: qsTr("Add Token")
|
||||||
|
onClicked: pageStack.push(Qt.resolvedUrl("ScanOTP.qml"), {parentPage: mainPage})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ViewPlaceholder {
|
ViewPlaceholder {
|
||||||
enabled: otpList.count == 0
|
enabled: otpList.count == 0
|
||||||
text: qsTr("Nothing here")
|
text: qsTr("Nothing here")
|
||||||
|
|
Loading…
Reference in a new issue