From ab36a3dad11da7f1d40f26412cef1d54a7852eac Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 10 Feb 2016 15:02:21 -0800 Subject: QML UI: make back key work for all pages Reported by a beta tester for the GPS preferences, but affects a couple more. We need to make sure that any page on the page stack is actually a MobileComponents.Page, other wise the Android back key doesn't close the page. This commit changes GPS preferences, the theme test, and the currently disabled download from divecomputer. it contains only the actual change (wrap the current content in a page). The reindentation is a separate commit for readability. Signed-off-by: Dirk Hohndel --- qt-mobile/qml/DownloadFromDiveComputer.qml | 3 +++ qt-mobile/qml/Preferences.qml | 3 ++- qt-mobile/qml/ThemeTest.qml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'qt-mobile') diff --git a/qt-mobile/qml/DownloadFromDiveComputer.qml b/qt-mobile/qml/DownloadFromDiveComputer.qml index 2cbbfadc6..fb2d0085b 100644 --- a/qt-mobile/qml/DownloadFromDiveComputer.qml +++ b/qt-mobile/qml/DownloadFromDiveComputer.qml @@ -5,7 +5,9 @@ import QtQuick.Window 2.2 import QtQuick.Dialogs 1.2 import QtQuick.Layouts 1.1 import org.subsurfacedivelog.mobile 1.0 +import org.kde.plasma.mobilecomponents 0.2 as MobileComponents +MobileComponents.Page { Item { id: diveComputerDownloadWindow anchors.top:parent.top @@ -109,3 +111,4 @@ Item { } } } +} diff --git a/qt-mobile/qml/Preferences.qml b/qt-mobile/qml/Preferences.qml index c8b172b31..3a092f348 100644 --- a/qt-mobile/qml/Preferences.qml +++ b/qt-mobile/qml/Preferences.qml @@ -6,7 +6,7 @@ import QtQuick.Layouts 1.1 import org.kde.plasma.mobilecomponents 0.2 as MobileComponents import org.subsurfacedivelog.mobile 1.0 - +MobileComponents.Page { GridLayout { signal accept @@ -75,3 +75,4 @@ GridLayout { Layout.fillHeight: true } } +} diff --git a/qt-mobile/qml/ThemeTest.qml b/qt-mobile/qml/ThemeTest.qml index 07e11cbce..f3d9d072d 100644 --- a/qt-mobile/qml/ThemeTest.qml +++ b/qt-mobile/qml/ThemeTest.qml @@ -2,6 +2,7 @@ import QtQuick 2.5 import QtQuick.Layouts 1.1 import org.kde.plasma.mobilecomponents 0.2 as MobileComponents +MobileComponents.Page { GridLayout { id: themetest columns: 2 @@ -95,3 +96,4 @@ GridLayout { Layout.fillHeight: true } } +} -- cgit v1.2.3-70-g09d2