From: David Llewellyn-Jones Date: Sat, 14 Jul 2018 23:57:32 +0000 (+0100) Subject: Fix landscape orientation X-Git-Url: https://www.flypig.org.uk/git/?p=harbour-pedalo.git;a=commitdiff_plain;h=b6fbaf91f247acb49e874b036d0df84f1850328a Fix landscape orientation --- diff --git a/qml/pages/About.qml b/qml/pages/About.qml index 60a30f9..df656ee 100644 --- a/qml/pages/About.qml +++ b/qml/pages/About.qml @@ -11,82 +11,83 @@ Page { // The effective value will be restricted by ApplicationWindow.allowedOrientations allowedOrientations: Orientation.All - width: parent.width - height: parent.height - - anchors.fill: parent - VerticalScrollDecorator {} - Column { - id: aboutColumn - width: parent.width - spacing: Theme.paddingLarge + SilicaFlickable { + anchors.fill: parent + contentHeight: aboutColumn.height + flickableDirection: Flickable.VerticalFlick - PageHeader { - title: qsTr("About Pedalo") - } + Column { + id: aboutColumn + width: parent.width + spacing: Theme.paddingLarge - Image { - anchors.topMargin: Theme.paddingLarge - anchors.horizontalCenter: parent.horizontalCenter - source : Qt.resolvedUrl("image://theme/icon-m-cloud-download") - } + PageHeader { + title: qsTr("About Pedalo") + } - Label { - text: qsTr("Compare your pedalo performance with others") - wrapMode: Text.WordWrap - font.pixelSize: Theme.fontSizeSmall - anchors { - leftMargin: Theme.paddingLarge - rightMargin: Theme.paddingLarge - left: parent.left - right: parent.right + Image { + anchors.topMargin: Theme.paddingLarge + anchors.horizontalCenter: parent.horizontalCenter + source : Qt.resolvedUrl("image://theme/icon-m-cloud-download") } - } - InfoRow { - label: qsTr("Version:") - value: version - midlineRatio: 0.3 - midlineMin: Theme.fontSizeSmall * 5 - midlineMax: Theme.fontSizeSmall * 10 - } + Label { + text: qsTr("Compare your pedalo performance with others") + wrapMode: Text.WordWrap + font.pixelSize: Theme.fontSizeSmall + anchors { + leftMargin: Theme.paddingLarge + rightMargin: Theme.paddingLarge + left: parent.left + right: parent.right + } + } - InfoRow { - label: qsTr("Author:") - value: "David Llewellyn-Jones" - midlineRatio: 0.3 - midlineMin: Theme.fontSizeSmall * 5 - midlineMax: Theme.fontSizeSmall * 10 - } + InfoRow { + label: qsTr("Version:") + value: version + midlineRatio: 0.3 + midlineMin: Theme.fontSizeSmall * 5 + midlineMax: Theme.fontSizeSmall * 10 + } - InfoRow { - label: qsTr("Licence:") - value: "MIT" - midlineRatio: 0.3 - midlineMin: Theme.fontSizeSmall * 5 - midlineMax: Theme.fontSizeSmall * 10 - } + InfoRow { + label: qsTr("Author:") + value: "David Llewellyn-Jones" + midlineRatio: 0.3 + midlineMin: Theme.fontSizeSmall * 5 + midlineMax: Theme.fontSizeSmall * 10 + } - SectionHeader { - text: qsTr("Links") - } + InfoRow { + label: qsTr("Licence:") + value: "MIT" + midlineRatio: 0.3 + midlineMin: Theme.fontSizeSmall * 5 + midlineMax: Theme.fontSizeSmall * 10 + } - Row { - spacing: Theme.paddingLarge - anchors.horizontalCenter: parent.horizontalCenter - Button { - id: website - text: qsTr("Website") - enabled: true - onClicked: Qt.openUrlExternally("http://www.flypig.co.uk/?to=pedalo") + SectionHeader { + text: qsTr("Links") } - Button { - id : email - text: qsTr("Email") - enabled: true - onClicked: Qt.openUrlExternally("mailto:david@flypig.co.uk") + + Row { + spacing: Theme.paddingLarge + anchors.horizontalCenter: parent.horizontalCenter + Button { + id: website + text: qsTr("Website") + enabled: true + onClicked: Qt.openUrlExternally("http://www.flypig.co.uk/?to=pedalo") + } + Button { + id : email + text: qsTr("Email") + enabled: true + onClicked: Qt.openUrlExternally("mailto:david@flypig.co.uk") + } } } } diff --git a/qml/pages/DurationEditDialog.qml b/qml/pages/DurationEditDialog.qml index 95e2dff..c1a577b 100644 --- a/qml/pages/DurationEditDialog.qml +++ b/qml/pages/DurationEditDialog.qml @@ -15,6 +15,9 @@ Dialog { canAccept: true + // The effective value will be restricted by ApplicationWindow.allowedOrientations + allowedOrientations: Orientation.All + SilicaFlickable { anchors.fill: parent contentHeight: column.height @@ -34,7 +37,7 @@ Dialog { width: parent.width TimePicker { id: timePicker - x: isPortrait ? (column.width-width)/2 : Theme.horizontalPageMargin + anchors.horizontalCenter: parent.horizontalCenter // otherwise in 12h mode this caused timer 00:00 to display as 12:00am hourMode: DateTime.TwentyFourHours