From 2668da3f60d0dc28d1777c1d6cf67e1ee8f88447 Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Sun, 29 Nov 2015 17:27:20 +0100 Subject: use mobilecomponents for our pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a dumb port of a number of properties to use the new theme and units API. - import the plugin - change accessors from units and theme to MobileComponents.Unit and MobileComponents.Theme Signed-off-by: Sebastian Kügler --- qt-mobile/qml/CloudStorage.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'qt-mobile/qml/CloudStorage.qml') diff --git a/qt-mobile/qml/CloudStorage.qml b/qt-mobile/qml/CloudStorage.qml index b199be739..3b94aa5e6 100644 --- a/qt-mobile/qml/CloudStorage.qml +++ b/qt-mobile/qml/CloudStorage.qml @@ -17,12 +17,12 @@ Item { GridLayout { columns: 2 anchors.fill: parent - anchors.margins: units.gridUnit + anchors.margins: MobileComponents.Units.gridUnit Label { text: "Cloud credentials" - Layout.bottomMargin: units.largeSpacing - font.pointSize: units.titlePointSize + Layout.bottomMargin: MobileComponents.Units.largeSpacing + font.pointSize: MobileComponents.Units.titlePointSize Layout.columnSpan: 2 } @@ -72,7 +72,7 @@ Item { id: savePassword } - Item { width: units.gridUnit; height: width } + Item { width: MobileComponents.Units.gridUnit; height: width } Item { height: saveButton.height width: saveButton.width -- cgit v1.2.3-70-g09d2 From 6580f078d0ae1d912d9a6b12e2769060b4c77f4b Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Sun, 29 Nov 2015 19:21:27 +0100 Subject: Fix reference errors caused by moving properties around MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes things like accent(Text)Color and our two custom point sizes for fonts resolve correctly again. Signed-off-by: Sebastian Kügler --- qt-mobile/qml/CloudStorage.qml | 2 +- qt-mobile/qml/DiveDetails.qml | 2 +- qt-mobile/qml/DiveList.qml | 4 ++-- qt-mobile/qml/Preferences.qml | 4 ++-- qt-mobile/qml/TopBar.qml | 8 ++++---- qt-mobile/qml/main.qml | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'qt-mobile/qml/CloudStorage.qml') diff --git a/qt-mobile/qml/CloudStorage.qml b/qt-mobile/qml/CloudStorage.qml index 3b94aa5e6..897ebfcee 100644 --- a/qt-mobile/qml/CloudStorage.qml +++ b/qt-mobile/qml/CloudStorage.qml @@ -22,7 +22,7 @@ Item { Label { text: "Cloud credentials" Layout.bottomMargin: MobileComponents.Units.largeSpacing - font.pointSize: MobileComponents.Units.titlePointSize + font.pointSize: subsurfaceTheme.titlePointSize Layout.columnSpan: 2 } diff --git a/qt-mobile/qml/DiveDetails.qml b/qt-mobile/qml/DiveDetails.qml index 5b597a0df..401921c9f 100644 --- a/qt-mobile/qml/DiveDetails.qml +++ b/qt-mobile/qml/DiveDetails.qml @@ -44,7 +44,7 @@ Item { Label { Layout.columnSpan: 2 - font.pointSize: MobileComponents.Units.titlePointSize + font.pointSize: subsurfaceTheme.titlePointSize text: "Dive " + number + " (" + date + ")" } diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml index 2a9c53de6..e0c8f4251 100644 --- a/qt-mobile/qml/DiveList.qml +++ b/qt-mobile/qml/DiveList.qml @@ -68,7 +68,7 @@ Rectangle { text: date opacity: 0.6 color: MobileComponents.Theme.textColor - font.pointSize: smallPointSize + font.pointSize: subsurfaceTheme.smallPointSize anchors { right: parent.right top: parent.top @@ -156,7 +156,7 @@ Rectangle { leftMargin: MobileComponents.Units.smallSpacing right: parent.right } - color: MobileComponents.Theme.accentColor + color: subsurfaceTheme.accentColor } } } diff --git a/qt-mobile/qml/Preferences.qml b/qt-mobile/qml/Preferences.qml index 1e1274e21..8cae95ff0 100644 --- a/qt-mobile/qml/Preferences.qml +++ b/qt-mobile/qml/Preferences.qml @@ -23,7 +23,7 @@ Item { Label { text: "Cloud credentials" Layout.bottomMargin: MobileComponents.Units.largeSpacing - font.pointSize: MobileComponents.Units.titlePointSize + font.pointSize: subsurfaceTheme.titlePointSize Layout.columnSpan: 2 } @@ -76,7 +76,7 @@ Item { Label { text: "Subsurface GPS data webservice" Layout.bottomMargin: MobileComponents.Units.largeSpacing - font.pointSize: MobileComponents.Units.titlePointSize + font.pointSize: subsurfaceTheme.titlePointSize Layout.columnSpan: 2 } diff --git a/qt-mobile/qml/TopBar.qml b/qt-mobile/qml/TopBar.qml index 43a5ad6af..f07a88e47 100644 --- a/qt-mobile/qml/TopBar.qml +++ b/qt-mobile/qml/TopBar.qml @@ -13,7 +13,7 @@ Rectangle { property bool goBack: (stackView.depth > 1) - color: MobileComponents.Theme.accentColor + color: subsurfaceTheme.accentColor Layout.minimumHeight: MobileComponents.Units.gridUnit * 2 + MobileComponents.Units.largeSpacing Layout.fillWidth: true Layout.margins: 0 @@ -47,7 +47,7 @@ Rectangle { font.pointSize: MobileComponents.Units.fontMetrics.font.pointSize * 1.5 verticalAlignment: Text.AlignBottom Layout.fillWidth: false - color: MobileComponents.Theme.accentTextColor + color: subsurfaceTheme.accentTextColor } } Item { @@ -63,11 +63,11 @@ Rectangle { style: ButtonStyle { background: Rectangle { implicitWidth: MobileComponents.Units.gridUnit * 2 - color: MobileComponents.Theme.accentColor + color: subsurfaceTheme.accentColor } label: Text { id: txt - color: MobileComponents.Theme.accentTextColor + color: subsurfaceTheme.accentTextColor font.pointSize: MobileComponents.Units.fontMetrics.font.pointSize * 2 font.bold: true text: control.text diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml index 5f4cdd352..ac2e3eefd 100644 --- a/qt-mobile/qml/main.qml +++ b/qt-mobile/qml/main.qml @@ -250,7 +250,7 @@ MobileComponents.ApplicationWindow { color: MobileComponents.Theme.textColor wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere styleColor: MobileComponents.Theme.textColor - font.pointSize: MobileComponents.Units.smallPointSize + font.pointSize: subsurfaceTheme.smallPointSize } } } -- cgit v1.2.3-70-g09d2