ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #03288
[Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/3-migrate-settings-page-listitems into lp:ubuntu-clock-app
Nekhelesh Ramananthan has proposed merging lp:~ubuntu-clock-dev/ubuntu-clock-app/3-migrate-settings-page-listitems into lp:ubuntu-clock-app with lp:~ubuntu-clock-dev/ubuntu-clock-app/2-migrate-add-city-listitems as a prerequisite.
Commit message:
Migrated settings page listitems to the new 15.04 list items
Requested reviews:
Ubuntu Clock Developers (ubuntu-clock-dev)
For more details, see:
https://code.launchpad.net/~ubuntu-clock-dev/ubuntu-clock-app/3-migrate-settings-page-listitems/+merge/263888
This MP implements the following,
- Migrate SubtitledListItem, Settings Page listitems to the new 15.04 ones
Note: No Visual Change
#blocked
--
Your team Ubuntu Clock Developers is requested to review the proposed merge of lp:~ubuntu-clock-dev/ubuntu-clock-app/3-migrate-settings-page-listitems into lp:ubuntu-clock-app.
=== modified file 'app/alarm/AlarmSettingsPage.qml'
--- app/alarm/AlarmSettingsPage.qml 2015-07-06 10:55:52 +0000
+++ app/alarm/AlarmSettingsPage.qml 2015-07-06 10:55:52 +0000
@@ -17,10 +17,10 @@
*/
import QtQuick 2.4
+import QtQuick.Layouts 1.1
import DateTime 1.0
import Alarm.Settings 1.0
import Ubuntu.Components 1.2
-import Ubuntu.Components.ListItems 1.0 as ListItem
import "../components"
Page {
@@ -84,7 +84,7 @@
right: parent.right
}
- ListItem.Empty {
+ ListItem {
height: 2 * implicitHeight
Label {
@@ -119,60 +119,80 @@
ExpandableListItem {
id: _alarmDuration
- listViewHeight: units.gu(24)
+ listViewHeight: units.gu(28)
text: i18n.tr("Silence after")
subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.duration).arg(alarmSettings.duration)
model: durationModel
- delegate: ListItem.Standard {
- text: model.text
+ delegate: ListItem {
+ RowLayout {
+ anchors {
+ left: parent.left
+ right: parent.right
+ margins: units.gu(2)
+ verticalCenter: parent.verticalCenter
+ }
+
+ Label {
+ text: model.text
+ Layout.fillWidth: true
+ }
+
+ Icon {
+ width: units.gu(2)
+ height: width
+ name: "ok"
+ visible: alarmSettings.duration === duration
+ }
+ }
+
onClicked: {
alarmSettings.duration = duration
_alarmDuration.expanded = false
}
-
- Icon {
- width: units.gu(2)
- height: width
- name: "ok"
- visible: alarmSettings.duration === duration
- anchors.right: parent.right
- anchors.rightMargin: units.gu(2)
- anchors.verticalCenter: parent.verticalCenter
- }
}
}
ExpandableListItem {
id: _alarmSnooze
- listViewHeight: units.gu(24)
+ listViewHeight: units.gu(28)
text: i18n.tr("Snooze for")
subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.snoozeDuration).arg(alarmSettings.snoozeDuration)
model: snoozeModel
- delegate: ListItem.Standard {
- text: model.text
+ delegate: ListItem {
+ RowLayout {
+ anchors {
+ left: parent.left
+ right: parent.right
+ margins: units.gu(2)
+ verticalCenter: parent.verticalCenter
+ }
+
+ Label {
+ text: model.text
+ Layout.fillWidth: true
+ }
+
+ Icon {
+ width: units.gu(2)
+ height: width
+ name: "ok"
+ visible: alarmSettings.snoozeDuration === duration
+ }
+ }
+
onClicked: {
alarmSettings.snoozeDuration = duration
_alarmSnooze.expanded = false
}
-
- Icon {
- width: units.gu(2)
- height: width
- name: "ok"
- visible: alarmSettings.snoozeDuration === duration
- anchors.right: parent.right
- anchors.rightMargin: units.gu(2)
- anchors.verticalCenter: parent.verticalCenter
- }
}
}
- ListItem.Empty {
+ ListItem {
Label {
text: i18n.tr("Vibration")
color: UbuntuColors.midAubergine
=== modified file 'app/components/ExpandableListItem.qml'
--- app/components/ExpandableListItem.qml 2015-07-06 10:55:52 +0000
+++ app/components/ExpandableListItem.qml 2015-07-06 10:55:52 +0000
@@ -43,7 +43,7 @@
}
collapseOnClick: true
- expandedHeight: contentColumn.height + units.gu(1)
+ expandedHeight: contentColumn.height
Column {
id: contentColumn
@@ -53,30 +53,26 @@
right: parent.right
}
- Item {
- width: parent.width
+ SubtitledListItem {
+ id: expandableHeader
height: expandableListItem.collapsedHeight
-
- SubtitledListItem {
- id: expandableHeader
- onClicked: expandableListItem.expanded = true
-
- Icon {
- id: arrow
-
- width: units.gu(2)
- height: width
- anchors.right: parent.right
- anchors.rightMargin: units.gu(2)
- anchors.verticalCenter: parent.verticalCenter
-
- name: "go-down"
- color: "Grey"
- rotation: expandableListItem.expanded ? 180 : 0
-
- Behavior on rotation {
- UbuntuNumberAnimation {}
- }
+ onClicked: expandableListItem.expanded = true
+
+ Icon {
+ id: arrow
+
+ width: units.gu(2)
+ height: width
+ anchors.right: parent.right
+ anchors.rightMargin: units.gu(2)
+ anchors.verticalCenter: parent.verticalCenter
+
+ name: "go-down"
+ color: "Grey"
+ rotation: expandableListItem.expanded ? 180 : 0
+
+ Behavior on rotation {
+ UbuntuNumberAnimation {}
}
}
}
=== modified file 'app/components/SubtitledListItem.qml'
--- app/components/SubtitledListItem.qml 2015-07-06 10:55:52 +0000
+++ app/components/SubtitledListItem.qml 2015-07-06 10:55:52 +0000
@@ -18,7 +18,6 @@
import QtQuick 2.4
import Ubuntu.Components 1.2
-import Ubuntu.Components.ListItems 1.0 as ListItem
/*
This component is almost an identical copy of the SDK's subtitled with the
@@ -27,7 +26,7 @@
#TODO: Revert to using the SDK Subtitled Component when they change the
design to match the new clock app design.
*/
-ListItem.Empty {
+ListItem {
id: _subtitledContainer
// Property to set the main text label
=== modified file 'po/com.ubuntu.clock.pot'
--- po/com.ubuntu.clock.pot 2015-07-06 10:55:52 +0000
+++ po/com.ubuntu.clock.pot 2015-07-06 10:55:52 +0000
@@ -11,7 +11,7 @@
<<<<<<< TREE
"POT-Creation-Date: 2015-06-18 18:12+0000\n"
=======
-"POT-Creation-Date: 2015-06-03 18:51+0000\n"
+"POT-Creation-Date: 2015-06-03 22:30+0000\n"
>>>>>>> MERGE-SOURCE
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -37,7 +37,7 @@
msgstr ""
#: ../app/alarm/AlarmPage.qml:41 ../app/alarm/AlarmPage.qml:66
-#: ../app/worldclock/WorldCityList.qml:80
+#: ../app/worldclock/WorldCityList.qml:79
msgid "Back"
msgstr ""
@@ -75,7 +75,7 @@
#: ../app/alarm/AlarmSettingsPage.qml:65 ../app/alarm/AlarmSettingsPage.qml:66
#: ../app/alarm/AlarmSettingsPage.qml:67 ../app/alarm/AlarmSettingsPage.qml:68
#: ../app/alarm/AlarmSettingsPage.qml:124
-#: ../app/alarm/AlarmSettingsPage.qml:152
+#: ../app/alarm/AlarmSettingsPage.qml:162
#, qt-format
msgid "%1 minute"
msgid_plural "%1 minutes"
@@ -90,15 +90,15 @@
msgid "Silence after"
msgstr ""
-#: ../app/alarm/AlarmSettingsPage.qml:151
+#: ../app/alarm/AlarmSettingsPage.qml:161
msgid "Snooze for"
msgstr ""
-#: ../app/alarm/AlarmSettingsPage.qml:177
+#: ../app/alarm/AlarmSettingsPage.qml:197
msgid "Vibration"
msgstr ""
-#: ../app/alarm/AlarmSettingsPage.qml:211
+#: ../app/alarm/AlarmSettingsPage.qml:231
msgid "Change time and date"
msgstr ""
@@ -171,7 +171,7 @@
msgstr ""
#: ../app/worldclock/AddWorldCityButton.qml:61
-#: ../app/worldclock/WorldCityList.qml:64
+#: ../app/worldclock/WorldCityList.qml:63
msgid "City"
msgstr ""
@@ -211,27 +211,27 @@
msgid "Same time"
msgstr ""
-#: ../app/worldclock/WorldCityList.qml:51
+#: ../app/worldclock/WorldCityList.qml:50
msgid "Select a city"
msgstr ""
-#: ../app/worldclock/WorldCityList.qml:109
+#: ../app/worldclock/WorldCityList.qml:108
msgid "Search..."
msgstr ""
-#: ../app/worldclock/WorldCityList.qml:213
+#: ../app/worldclock/WorldCityList.qml:212
msgid "Searching for a city"
msgstr ""
-#: ../app/worldclock/WorldCityList.qml:218
+#: ../app/worldclock/WorldCityList.qml:217
msgid "No City Found"
msgstr ""
+#: ../app/worldclock/WorldCityList.qml:223
+msgid "Unable to connect."
+msgstr ""
+
#: ../app/worldclock/WorldCityList.qml:224
-msgid "Unable to connect."
-msgstr ""
-
-#: ../app/worldclock/WorldCityList.qml:225
msgid "Please check your network connection and try again"
msgstr ""
Follow ups