Skip to content

Commit

Permalink
Use allowedOrientation of AboutPage for subpages
Browse files Browse the repository at this point in the history
  • Loading branch information
buschmann23 committed Jan 29, 2022
1 parent 181dd4c commit 6c268c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions qml/de/huessenbergnetz/hbnsc/AboutPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,19 @@ Page {
MenuItem {
//% "Privacy Policy"
text: qsTrId("btsc-priv-policy")
onClicked: pageStack.push(privacyPolicyQmlFile)
onClicked: pageStack.push(privacyPolicyQmlFile, {allowedOrientations: about.allowedOrientations})
visible: privacyPolicyQmlFile.length > 0
}
MenuItem {
//% "Changelog"
text: qsTrId("btsc-changelog")
onClicked: pageStack.push(Qt.resolvedUrl("Changelog.qml"), {model: changelogModel, bugTrackerBase: bugTrackerBaseUrl})
onClicked: pageStack.push(Qt.resolvedUrl("Changelog.qml"), {model: changelogModel, bugTrackerBase: bugTrackerBaseUrl, allowedOrientations: about.allowedOrientations})
visible: changelogModel !== null
}
MenuItem {
//% "Contributors"
text: qsTrId("btsc-contributors")
onClicked: pageStack.push(Qt.resolvedUrl("Contributors.qml"), { avatarBasePath: contributorsAvatarBasePath, model: contributorsModel })
onClicked: pageStack.push(Qt.resolvedUrl("Contributors.qml"), { avatarBasePath: contributorsAvatarBasePath, model: contributorsModel, allowedOrientations: about.allowedOrientations})
visible: contributorsModel !== null
}
}
Expand Down Expand Up @@ -190,7 +190,7 @@ Page {
if (appCustomLicense.toString().length > 0) {
pageStack.push(appCustomLicense)
} else if (appLicenseFile !== "") {
pageStack.push("licenses/"+appLicenseFile, {componentName: appTitle, componentAuthor: appCopyrightHolder})
pageStack.push("licenses/"+appLicenseFile, {componentName: appTitle, componentAuthor: appCopyrightHolder, allowedOrientations: about.allowedOrientations})
}
}

Expand Down Expand Up @@ -401,7 +401,7 @@ Page {
id: licensesRepeater
width: parent.width
itemHeight: Theme.itemSizeMedium
delegate: LicenseDelegate {}
delegate: LicenseDelegate { allowedOrientations: about.allowedOrientations }
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions qml/de/huessenbergnetz/hbnsc/LicenseDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ BackgroundItem {
id: lic
width: parent.width
height: Theme.itemSizeMedium
property int allowedOrientations: value

onClicked: {
if (model.licenseFile) {
var args = {
allowedOrientations: lic.allowedOrientations,
componentName: model.name,
componentAuthor: model.author,
}
Expand Down

0 comments on commit 6c268c6

Please sign in to comment.