ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #08196
[Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
Nekhelesh Ramananthan has proposed merging lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app.
Commit message:
Clock New Design Implementation
Requested reviews:
Nekhelesh Ramananthan (nik90)
Related bugs:
Bug #1528241 in Ubuntu Clock App: "Clock should implement new UI according to UX desgin"
https://bugs.launchpad.net/ubuntu-clock-app/+bug/1528241
Bug #1543472 in Ubuntu Clock App: "Update all list item components for all relevant views "
https://bugs.launchpad.net/ubuntu-clock-app/+bug/1543472
Bug #1543501 in Ubuntu Clock App: "settings: wrong font colour (purple) for section titles"
https://bugs.launchpad.net/ubuntu-clock-app/+bug/1543501
For more details, see:
https://code.launchpad.net/~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design/+merge/281972
Clock New Design Implementation
--
Your team Ubuntu Clock Developers is subscribed to branch lp:ubuntu-clock-app.
=== modified file 'app/alarm/AlarmDelegate.qml'
--- app/alarm/AlarmDelegate.qml 2016-01-05 10:56:20 +0000
+++ app/alarm/AlarmDelegate.qml 2016-02-16 17:33:54 +0000
@@ -17,7 +17,6 @@
*/
import QtQuick 2.4
-import QtQuick.Layouts 1.1
import Ubuntu.Components 1.3
ListItem {
@@ -25,134 +24,101 @@
property var localTime
property bool showAlarmFrequency
-
- width: parent ? parent.width : 0
- height: units.gu(9)
- divider.visible: true
+ property string alarmOccurrence: type === Alarm.Repeating ? alarmUtils.format_day_string(daysOfWeek, type)
+ : alarmUtils.get_time_to_alarm(model.date, localTime)
onShowAlarmFrequencyChanged: {
if (type === Alarm.Repeating && model.enabled) {
- alarmSubtitle.animateTextChange()
- }
- }
-
- Column {
- id: alarmDetailsColumn
-
- spacing: units.gu(1)
- opacity: model.enabled ? 1.0 : 0.8
-
- anchors {
- left: parent.left
- leftMargin: units.gu(2)
- right: alarmStatus.left
- rightMargin: units.gu(1)
- verticalCenter: parent.verticalCenter
- }
-
- Label {
- id: alarmTime
- objectName: "listAlarmTime" + index
-
- color: UbuntuColors.midAubergine
- fontSize: "x-large"
- text: Qt.formatTime(model.date)
- }
-
- RowLayout {
- width: parent.width
- spacing: units.gu(1)
-
- Label {
- id: alarmLabel
- objectName: "listAlarmLabel" + index
-
- text: message
- fontSize: "small"
- elide: Text.ElideRight
- Layout.maximumWidth: parent.width > alarmLabel.contentWidth + alarmSubtitle.contentWidth ? (parent.width - alarmSubtitle.contentWidth - units.gu(4))
- : contentWidth
- }
-
- Label {
- text: "|"
- visible: alarmSubtitle.visible
- }
-
- Label {
- id: alarmSubtitle
- objectName: "listAlarmSubtitle" + index
-
- fontSize: "small"
- Layout.fillWidth: true
- visible: ((type === Alarm.Repeating) || model.enabled) && (model.status === Alarm.Ready)
- elide: Text.ElideRight
- text: type === Alarm.Repeating ? alarmUtils.format_day_string(daysOfWeek, type) :
- alarmUtils.get_time_to_alarm(model.date, localTime)
-
- function animateTextChange() {
- textChangeAnimation.start()
- }
-
-
- SequentialAnimation {
- id: textChangeAnimation
- PropertyAnimation {
- target: alarmSubtitle
- property: "opacity"
- to: 0
- duration: UbuntuAnimation.BriskDuration
- }
-
- ScriptAction {
- script: alarmSubtitle.text = showAlarmFrequency ? alarmUtils.format_day_string(daysOfWeek, type)
- : alarmUtils.get_time_to_alarm(model.date, localTime)
- }
-
- PropertyAnimation {
- target: alarmSubtitle
- property: "opacity"
- to: 1.0
- duration: UbuntuAnimation.BriskDuration
- }
- }
- }
- }
- }
-
- Switch {
- id: alarmStatus
- objectName: "listAlarmStatus" + index
- checked: model.enabled && (model.status === Alarm.Ready)
-
- anchors {
- right: parent.right
- rightMargin: units.gu(2)
- verticalCenter: parent.verticalCenter
- }
-
- onCheckedChanged: {
- if (checked !== model.enabled) {
- /*
- Calculate the alarm time if it is a one-time alarm.
- Repeating alarms do this automatically.
- */
- if(type === Alarm.OneTime) {
- var date = new Date()
- date.setHours(model.date.getHours(), model.date.getMinutes(), 0)
-
- model.daysOfWeek = Alarm.AutoDetect
- if (date < new Date()) {
- var tomorrow = new Date()
- tomorrow.setDate(tomorrow.getDate() + 1)
- model.daysOfWeek = alarmUtils.get_alarm_day(tomorrow.getDay())
- }
- model.date = date
-
- }
- model.enabled = checked
- model.save()
- }
- }
- }
+ animateTextChange()
+ }
+ }
+
+ function animateTextChange() {
+ textChangeAnimation.start()
+ }
+
+ height: mainLayout.height + divider.height
+
+ SequentialAnimation {
+ id: textChangeAnimation
+
+ PropertyAnimation {
+ target: mainLayout.summary
+ property: "opacity"
+ to: 0
+ duration: UbuntuAnimation.BriskDuration
+ }
+
+ ScriptAction {
+ script: alarmOccurrence = showAlarmFrequency ? alarmUtils.format_day_string(daysOfWeek, type)
+ : alarmUtils.get_time_to_alarm(model.date, localTime)
+ }
+
+ PropertyAnimation {
+ target: mainLayout.summary
+ property: "opacity"
+ to: 1.0
+ duration: UbuntuAnimation.BriskDuration
+ }
+ }
+
+ ListItemLayout {
+ id: mainLayout
+
+ title.text: Qt.formatTime(model.date) // Alarm time
+ title.font.weight: Font.Normal
+ subtitle.text: message // Alarm name
+ summary.text: alarmOccurrence
+
+ Switch {
+ id: alarmStatus
+
+ objectName: "listAlarmStatus" + index
+ anchors.verticalCenter: parent.verticalCenter
+ SlotsLayout.position: SlotsLayout.Trailing
+ SlotsLayout.overrideVerticalPositioning: true
+ checked: model.enabled && (model.status === Alarm.Ready)
+ onCheckedChanged: {
+ if (checked !== model.enabled) {
+ /*
+ Calculate the alarm time if it is a one-time alarm.
+ Repeating alarms do this automatically.
+ */
+ if(type === Alarm.OneTime) {
+ var date = new Date()
+ date.setHours(model.date.getHours(), model.date.getMinutes(), 0)
+
+ model.daysOfWeek = Alarm.AutoDetect
+ if (date < new Date()) {
+ var tomorrow = new Date()
+ tomorrow.setDate(tomorrow.getDate() + 1)
+ model.daysOfWeek = alarmUtils.get_alarm_day(tomorrow.getDay())
+ }
+ model.date = date
+
+ }
+ model.enabled = checked
+ model.save()
+ }
+ }
+
+ Connections {
+ target: model
+ onStatusChanged: {
+ /*
+ Update switch value only when the alarm save() operation
+ is complete to avoid switching it back.
+ */
+ if (model.status === Alarm.Ready) {
+ alarmStatus.checked = model.enabled;
+
+ if (!alarmStatus.checked && type === Alarm.Repeating) {
+ alarmOccurrence = alarmUtils.format_day_string(daysOfWeek, type)
+ }
+ }
+ }
+ }
+ }
+ }
+
}
=== modified file 'app/alarm/AlarmRepeat.qml'
--- app/alarm/AlarmRepeat.qml 2015-10-22 16:49:23 +0000
+++ app/alarm/AlarmRepeat.qml 2016-02-16 17:33:54 +0000
@@ -149,40 +149,29 @@
property alias isChecked: daySwitch.checked
- Label {
+ height: _alarmDay.height + divider.height
+
+ ListItemLayout {
id: _alarmDay
objectName: 'alarmDay' + index
- anchors {
- left: parent.left
- leftMargin: units.gu(2)
- verticalCenter: parent.verticalCenter
- }
-
- color: UbuntuColors.midAubergine
- text: day
- }
-
- CheckBox {
- id: daySwitch
- objectName: 'daySwitch' + index
-
- anchors {
- right: parent.right
- rightMargin: units.gu(2)
- verticalCenter: parent.verticalCenter
- }
-
- checked: (alarm.daysOfWeek & flag) == flag
- && alarm.type === Alarm.Repeating
- onCheckedChanged: {
- if (checked) {
- alarm.daysOfWeek |= flag
- } else {
- alarm.daysOfWeek &= ~flag
+ title.text: day
+
+ CheckBox {
+ id: daySwitch
+ objectName: 'daySwitch' + index
+ SlotsLayout.position: SlotsLayout.Trailing
+ checked: (alarm.daysOfWeek & flag) == flag
+ && alarm.type === Alarm.Repeating
+ onCheckedChanged: {
+ if (checked) {
+ alarm.daysOfWeek |= flag
+ } else {
+ alarm.daysOfWeek &= ~flag
+ }
+
+ detectAlarmType()
}
-
- detectAlarmType()
}
}
=== modified file 'app/alarm/AlarmSettingsPage.qml'
--- app/alarm/AlarmSettingsPage.qml 2015-12-20 00:01:25 +0000
+++ app/alarm/AlarmSettingsPage.qml 2016-02-16 17:33:54 +0000
@@ -17,10 +17,8 @@
*/
import QtQuick 2.4
-import QtQuick.Layouts 1.1
import WorldClock 1.0
import Alarm 1.0
-import Ubuntu.Settings.Menus 0.1 as Menus
import Ubuntu.Components 1.3
import "../components"
@@ -85,67 +83,58 @@
top: parent.top
left: parent.left
right: parent.right
- topMargin: units.gu(2)
- }
-
- Label {
- color: UbuntuColors.midAubergine
- text: i18n.tr("Alarm volume")
- anchors {
- left: parent.left
- leftMargin: units.gu(2)
- }
- }
-
- Menus.SliderMenu {
- anchors {
- left: parent.left
- right: parent.right
- }
- minimumValue: 1
- maximumValue: 100
- live: true
- value: alarmSettings.volume
-
- onValueChanged: {
- alarmSettings.volume = value
- }
- }
-
+ }
+
+ ListItem {
+ height: alarmVolumeSlot.height + divider.height
+
+ SlotsLayout {
+ id: alarmVolumeSlot
+
+ mainSlot: Column {
+ Label {
+ text: i18n.tr("Alarm volume")
+ }
+
+ Slider {
+ minimumValue: 1
+ maximumValue: 100
+ live: true
+ value: alarmSettings.volume
+ function formatValue(v) { return v = "" }
+ onValueChanged: {
+ alarmSettings.volume = value
+ }
+ }
+ }
+ }
+ }
+
ExpandableListItem {
id: _alarmDuration
listViewHeight: units.gu(28)
- text: i18n.tr("Alarm stops after")
- subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.duration).arg(alarmSettings.duration)
+ titleText.text: i18n.tr("Alarm stops after")
+ subText.text: i18n.tr("%1 minute", "%1 minutes", alarmSettings.duration).arg(alarmSettings.duration)
model: durationModel
delegate: ListItem {
- RowLayout {
- anchors {
- left: parent.left
- right: parent.right
- margins: units.gu(2)
- verticalCenter: parent.verticalCenter
- }
-
- Label {
- text: model.text
- Layout.fillWidth: true
- }
+ ListItemLayout {
+ title.text: model.text
Icon {
+ SlotsLayout.position: SlotsLayout.Trailing
width: units.gu(2)
height: width
- name: "ok"
+ name: "tick"
visible: alarmSettings.duration === duration
}
}
onClicked: {
alarmSettings.duration = duration
- _alarmDuration.expanded = false
+ _alarmDuration.expansion.expanded = false
}
}
}
@@ -154,66 +143,47 @@
id: _alarmSnooze
listViewHeight: units.gu(28)
- text: i18n.tr("Snooze for")
- subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.snoozeDuration).arg(alarmSettings.snoozeDuration)
+ titleText.text: i18n.tr("Snooze for")
+ subText.text: i18n.tr("%1 minute", "%1 minutes", alarmSettings.snoozeDuration).arg(alarmSettings.snoozeDuration)
model: snoozeModel
delegate: ListItem {
- RowLayout {
- anchors {
- left: parent.left
- right: parent.right
- margins: units.gu(2)
- verticalCenter: parent.verticalCenter
- }
-
- Label {
- text: model.text
- Layout.fillWidth: true
- }
+ ListItemLayout {
+ title.text: model.text
Icon {
+ SlotsLayout.position: SlotsLayout.Trailing
width: units.gu(2)
height: width
- name: "ok"
+ name: "tick"
visible: alarmSettings.snoozeDuration === duration
}
}
onClicked: {
alarmSettings.snoozeDuration = duration
- _alarmSnooze.expanded = false
+ _alarmSnooze.expansion.expanded = false
}
}
}
ListItem {
- Label {
- text: i18n.tr("Vibration")
- color: UbuntuColors.midAubergine
- anchors {
- left: parent.left
- leftMargin: units.gu(2)
- verticalCenter: parent.verticalCenter
- }
- }
-
- Switch {
- id: vibrateSwitch
-
- anchors {
- right: parent.right
- rightMargin: units.gu(2)
- verticalCenter: parent.verticalCenter
- }
-
- checked: alarmSettings.vibration === "pulse"
- onCheckedChanged: {
- if(checked) {
- alarmSettings.vibration = "pulse"
- } else {
- alarmSettings.vibration = "none"
+ height: vibrationLayout.height + divider.height
+ ListItemLayout {
+ id: vibrationLayout
+ title.text: i18n.tr("Vibration")
+
+ Switch {
+ id: vibrateSwitch
+ SlotsLayout.position: SlotsLayout.Trailing
+ checked: alarmSettings.vibration === "pulse"
+ onCheckedChanged: {
+ if(checked) {
+ alarmSettings.vibration = "pulse"
+ } else {
+ alarmSettings.vibration = "none"
+ }
}
}
}
@@ -223,13 +193,28 @@
}
}
- SubtitledListItem {
- text: i18n.tr("Change time and date")
- subText: localTimeSource.localizedCurrentDateString + " " + localTimeSource.localizedCurrentTimeString
+ ListItem {
+ height: timeAndDateLayout.height + divider.height
+ ListItemLayout {
+ id: timeAndDateLayout
+ title.text: i18n.tr("Change time and date")
+ subtitle.text: localTimeSource.localizedCurrentDateString + " " + localTimeSource.localizedCurrentTimeString
+
+ Icon {
+ SlotsLayout.position: SlotsLayout.Trailing
+ SlotsLayout.overrideVerticalPositioning: true
+ anchors.verticalCenter: parent.verticalCenter
+ width: units.gu(2)
+ height: width
+ name: "go-next"
+ }
+ }
+
onClicked: {
Qt.openUrlExternally("settings:///system/time-date")
}
}
+
}
}
}
=== modified file 'app/alarm/AlarmSound.qml'
--- app/alarm/AlarmSound.qml 2015-12-11 02:13:16 +0000
+++ app/alarm/AlarmSound.qml 2016-02-16 17:33:54 +0000
@@ -21,7 +21,6 @@
import QtMultimedia 5.0
import Ubuntu.Content 1.1
import Ubuntu.Components 1.3
-import QtQuick.Layouts 1.1
import Qt.labs.folderlistmodel 2.1
Page {
@@ -168,15 +167,16 @@
id: _pageFlickable
anchors.fill: parent
- contentHeight: defaultSoundModel.count * units.gu(7) +
- customSoundModel.count * units.gu(7) +
- customSoundListItem.height +
- 2 * customSoundsHeader.implicitHeight + units.gu(4)
+ contentHeight: _alarmSoundColumn.height
Column {
id: _alarmSoundColumn
- anchors.fill: parent
+ anchors {
+ top: parent.top
+ right: parent.right
+ left: parent.left
+ }
ListItem {
height: customSoundsHeader.implicitHeight + units.gu(2)
@@ -216,11 +216,10 @@
id: _customAlarmSoundDelegate
objectName: "customAlarmSoundDelegate" + index
- property bool isChecked: alarmSound.subText === _customSoundName.text ? true
+ property bool isChecked: alarmSound.subText === _customSoundName.title.text ? true
: false
- height: units.gu(7)
- color: isChecked ? Theme.palette.selected.background : "Transparent"
+ height: _customSoundName.height + divider.height
leadingActions: ListItemActions {
actions: [
@@ -277,29 +276,14 @@
]
}
- RowLayout {
- spacing: units.gu(2)
-
- anchors {
- fill: parent
- leftMargin: units.gu(2)
- rightMargin: units.gu(2)
- }
-
- Label {
- id: _customSoundName
- objectName: "customSoundName" + index
-
- anchors.verticalCenter: parent.verticalCenter
- Layout.fillWidth: true
-
- elide: Text.ElideRight
- color: UbuntuColors.midAubergine
- fontSize: "medium"
- text: fileBaseName
- }
+ ListItemLayout {
+ id: _customSoundName
+ objectName: "customSoundName" + index
+
+ title.text: fileBaseName
Icon {
+ SlotsLayout.position: SlotsLayout.Trailing
width: units.gu(2)
height: width
name: "media-playback-pause"
@@ -309,17 +293,17 @@
Icon {
id: tickIcon
+ SlotsLayout.position: SlotsLayout.Last
+ opacity: _customAlarmSoundDelegate.isChecked ? 1 : 0
width: units.gu(2)
height: width
name: "tick"
- visible: _customAlarmSoundDelegate.isChecked
- anchors.verticalCenter: parent.verticalCenter
}
}
onIsCheckedChanged: {
if (isChecked) {
- alarmSound.subText = _customSoundName.text
+ alarmSound.subText = _customSoundName.title.text
alarm.sound = fileURL
// Ensures only one custom alarm sound is selected
@@ -369,34 +353,19 @@
id: _alarmSoundDelegate
objectName: "alarmSoundDelegate" + index
- property bool isChecked: alarmSound.subText === _soundName.text ? true
+ property bool isChecked: alarmSound.subText === _soundName.title.text ? true
: false
- height: units.gu(7)
- color: isChecked ? Theme.palette.selected.background : "Transparent"
-
- RowLayout {
- spacing: units.gu(2)
-
- anchors {
- fill: parent
- leftMargin: units.gu(2)
- rightMargin: units.gu(2)
- }
-
- Label {
- id: _soundName
- objectName: "soundName" + index
-
- anchors.verticalCenter: parent.verticalCenter
- Layout.fillWidth: true
-
- color: UbuntuColors.midAubergine
- fontSize: "medium"
- text: fileBaseName
- }
+ height: _soundName.height + divider.height
+
+ ListItemLayout {
+ id: _soundName
+ objectName: "soundName" + index
+
+ title.text: fileBaseName
Icon {
+ SlotsLayout.position: SlotsLayout.Trailing
width: units.gu(2)
height: width
name: "media-playback-pause"
@@ -405,17 +374,18 @@
}
Icon {
+ SlotsLayout.position: SlotsLayout.Last
+ opacity: _alarmSoundDelegate.isChecked ? 1 : 0
width: units.gu(2)
height: width
name: "tick"
- visible: _alarmSoundDelegate.isChecked
anchors.verticalCenter: parent.verticalCenter
}
}
onIsCheckedChanged: {
if (isChecked) {
- alarmSound.subText = _soundName.text
+ alarmSound.subText = _soundName.title.text
alarm.sound = fileURL
// Ensures only one alarm sound is selected
=== modified file 'app/alarm/EditAlarmPage.qml'
--- app/alarm/EditAlarmPage.qml 2015-12-11 02:11:11 +0000
+++ app/alarm/EditAlarmPage.qml 2016-02-16 17:33:54 +0000
@@ -266,39 +266,60 @@
}
}
- SubtitledListItem {
+ ListItem {
id: _alarmRepeat
objectName: "alarmRepeat"
- text: i18n.tr("Repeat")
- subText: alarmUtils.format_day_string(_alarm.daysOfWeek, _alarm.type)
+ property string subText: alarmUtils.format_day_string(_alarm.daysOfWeek, _alarm.type)
+ height: alarmRepeatLayout.height + divider.height
+
+ ListItemLayout {
+ id: alarmRepeatLayout
+
+ title.text: i18n.tr("Repeat")
+ subtitle.text: _alarmRepeat.subText
+ }
onClicked: pageStack.push(Qt.resolvedUrl("AlarmRepeat.qml"),
{"alarm": _alarm, "alarmUtils": alarmUtils})
}
- SubtitledListItem {
+ ListItem {
id: _alarmLabel
objectName: "alarmLabel"
-
- text: i18n.tr("Label")
- subText: _alarm.message
+ height: alarmLabelLayout.height + divider.height
+
+ ListItemLayout {
+ id: alarmLabelLayout
+
+ title.text: i18n.tr("Label")
+ subtitle.text: _alarm.message
+ }
onClicked: pageStack.push(Qt.resolvedUrl("AlarmLabel.qml"),
{"alarm": _alarm})
}
- SubtitledListItem {
+ ListItem {
id: _alarmSound
objectName: "alarmSound"
readonly property string defaultAlarmSound: "Alarm clock"
readonly property string defaultAlarmSoundFileName: "Alarm clock.ogg"
-
- text: i18n.tr("Sound")
+ property string subText
+
+ height: alarmSoundLayout.height + divider.height
+
+ ListItemLayout {
+ id: alarmSoundLayout
+
+ title.text: i18n.tr("Sound")
+ subtitle.text: _alarmSound.subText
+ }
onClicked: pageStack.push(Qt.resolvedUrl("AlarmSound.qml"), {
"alarmSound": _alarmSound,
"alarm": _alarm
})
}
+
}
Button {
=== modified file 'app/clock/ClockPage.qml'
--- app/clock/ClockPage.qml 2016-01-16 08:18:05 +0000
+++ app/clock/ClockPage.qml 2016-02-16 17:33:54 +0000
@@ -192,7 +192,7 @@
anchors {
verticalCenter: parent.top
- verticalCenterOffset: units.gu(18)
+ verticalCenterOffset: units.gu(14)
horizontalCenter: parent.horizontalCenter
}
}
@@ -201,16 +201,14 @@
id: date
anchors {
- top: parent.top
- topMargin: units.gu(41)
+ top: clock.bottom
+ //topMargin: units.gu(29)
horizontalCenter: parent.horizontalCenter
}
text: clock.localizedDateString
-
+ textSize: Label.Small
opacity: 0
- color: locationRow.visible ? Theme.palette.normal.baseText : UbuntuColors.midAubergine
- fontSize: "medium"
}
Row {
@@ -223,7 +221,7 @@
anchors {
top: date.bottom
- topMargin: units.gu(1)
+ topMargin: units.gu(2)
horizontalCenter: parent.horizontalCenter
}
@@ -231,16 +229,14 @@
id: locationIcon
name: "location"
height: units.gu(2.2)
- color: "Grey"
+ color: location.color
}
Label {
id: location
objectName: "location"
- fontSize: "medium"
anchors.verticalCenter: locationIcon.verticalCenter
- color: UbuntuColors.midAubergine
text: {
if (userLocationDocument.contents.location === "Null"
@@ -256,14 +252,24 @@
}
}
+ Rectangle {
+ id: divider
+ width: parent.width
+ height: 1
+ color: "#cdcdcd"
+ anchors {
+ top: locationRow.bottom
+ topMargin: units.gu(3)
+ }
+ }
+
MouseArea {
id: worldCityListMouseArea
preventStealing: true
anchors {
- top: locationRow.bottom
- topMargin: units.gu(2)
+ top: divider.bottom
bottom: parent.bottom
left: parent.left
right: parent.right
@@ -311,7 +317,7 @@
target: date
property: "anchors.topMargin"
from: units.gu(29)
- to: units.gu(37)
+ to: units.gu(4)
duration: 900
}
}
=== modified file 'app/clock/MainClock.qml'
--- app/clock/MainClock.qml 2016-01-16 08:18:05 +0000
+++ app/clock/MainClock.qml 2016-02-16 17:33:54 +0000
@@ -26,13 +26,14 @@
// Property to keep track of the cold start status of the app
property bool isColdStart: true
- fontSize: units.dp(62)
+ fontSize: units.dp(44)
periodFontSize: units.dp(12)
- innerCircleWidth: units.gu(23)
+ innerCircleWidth: units.gu(24)
isMainClock: true
isDigital: clockModeDocument.contents.digitalMode ? true : false
+ height: width
Component.onCompleted: {
clockOpenAnimation.start()
@@ -76,7 +77,7 @@
UbuntuNumberAnimation {
target: mainClock
property: "width"
- to: units.gu(32)
+ to: units.gu(24)
duration: 900
}
=== modified file 'app/components/ActionIcon.qml'
--- app/components/ActionIcon.qml 2015-10-22 16:49:23 +0000
+++ app/components/ActionIcon.qml 2016-02-16 17:33:54 +0000
@@ -25,8 +25,9 @@
property alias iconName: _icon.name
property alias iconSource: _icon.source
property alias iconWidth: _icon.width
+ property alias iconColor: _icon.color
- width: units.gu(5)
+ width: units.gu(4)
height: width
Rectangle {
@@ -37,9 +38,9 @@
Icon {
id: _icon
- width: units.gu(3)
+ width: units.gu(2)
height: width
anchors.centerIn: parent
- color: "#5B5B5B"
+ color: "#5d5d5d"
}
}
=== removed file 'app/components/Background.qml'
--- app/components/Background.qml 2015-10-22 16:49:23 +0000
+++ app/components/Background.qml 1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2014-2015 Canonical Ltd
- *
- * This file is part of Ubuntu Clock App
- *
- * Ubuntu Clock App is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Ubuntu Clock App is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-import QtQuick 2.4
-import Ubuntu.Components 1.3
-
-/*
- Component to set the background of the app
- */
-
-Image {
- id: _background
-
- asynchronous: true
- anchors.fill: parent
- source: "../graphics/Background_Texture.jpg"
-}
=== modified file 'app/components/CMakeLists.txt'
--- app/components/CMakeLists.txt 2016-01-19 12:47:55 +0000
+++ app/components/CMakeLists.txt 2016-02-16 17:33:54 +0000
@@ -2,7 +2,6 @@
ActionIcon.qml
AnalogMode.qml
AnalogShadow.qml
- Background.qml
Circle.qml
Clock.qml
ClockCircle.qml
@@ -12,7 +11,6 @@
ExpandableListItem.qml
HeaderNavigation.qml
Shadow.qml
- SubtitledListItem.qml
)
# make the files visible in the qtcreator tree
=== modified file 'app/components/Clock.qml'
--- app/components/Clock.qml 2015-10-22 16:49:23 +0000
+++ app/components/Clock.qml 2016-02-16 17:33:54 +0000
@@ -38,8 +38,8 @@
- Disable the clock hand in the child elements (world clock) as per the design
spec.
*/
-ClockCircle {
- id: _outerCircle
+Item {
+ id: _clockContainer
// String with not localized date and time in format "yyyy:MM:dd:hh:mm:ss", eg.: "2015:10:05:16:10:15"
property string notLocalizedDateTimeString
@@ -72,9 +72,6 @@
clockFlipAnimation.start()
}
- // Sets the style to outer circle
- isOuter: true
-
Shadow {
id: upperShadow
rotation: 0
=== modified file 'app/components/ClockCircle.qml'
--- app/components/ClockCircle.qml 2016-01-16 08:35:09 +0000
+++ app/components/ClockCircle.qml 2016-02-16 17:33:54 +0000
@@ -30,31 +30,23 @@
If used as the inner circle, a textured background image is set as part of
the new design specs.
-
- The circle position is set by the public property "isOuter". If true, the
- outer circle characteristics are set and vice-versa.
*/
Circle {
id: _innerCircle
- /*
- Property to set if the circle is the outer or the inner circle
- */
- property bool isOuter: false
-
- color: isOuter ? "#4DFFFFFF" : "#08000000"
- borderWidth: units.gu(0.2)
- borderColorTop: isOuter ? "#6E6E6E" : "#00000000"
- borderColorBottom: isOuter ? "#00000000" : "#6E6E6E"
+ color: "#f7f7f7"
+ borderWidth: units.dp(1)/*units.gu(0.2)*/
+ borderColorTop: "#00000000"
+ borderColorBottom: "#6E6E6E"
borderOpacity: 0.65
- borderGradientPosition: isOuter ? 0.7 : 0.2
+ borderGradientPosition: 0.2
- Image {
- anchors.fill: parent
- anchors.margins: borderWidth / 2.0
- smooth: true
- fillMode: Image.PreserveAspectFit
- source: !isOuter ? "../graphics/Inner_Clock_Texture.png" : ""
- cache: false
- }
+// Image {
+// anchors.fill: parent
+// anchors.margins: borderWidth / 2.0
+// smooth: true
+// fillMode: Image.PreserveAspectFit
+// source: !isOuter ? "../graphics/Inner_Clock_Texture.png" : ""
+// cache: false
+// }
}
=== modified file 'app/components/DigitalMode.qml'
--- app/components/DigitalMode.qml 2016-01-16 08:18:05 +0000
+++ app/components/DigitalMode.qml 2016-02-16 17:33:54 +0000
@@ -47,8 +47,8 @@
anchors.centerIn: parent
- color: UbuntuColors.midAubergine
font.pixelSize: maxTimeFontSize
+
text: {
if (localizedTimeString.search(Qt.locale().amText) !== -1) {
// 12 hour format detected with the localised AM text
@@ -71,7 +71,6 @@
anchors.top: _digitalTime.bottom
anchors.horizontalCenter: parent.horizontalCenter
- color: UbuntuColors.midAubergine
font.pixelSize: maxPeriodFontSize
visible: text !== ""
text: {
=== modified file 'app/components/EmptyState.qml'
--- app/components/EmptyState.qml 2015-10-22 16:49:23 +0000
+++ app/components/EmptyState.qml 2016-02-16 17:33:54 +0000
@@ -44,7 +44,7 @@
Label {
id: emptyLabel
- fontSize: "large"
+ textSize: Label.Large
font.bold: true
width: parent.width
wrapMode: Text.WordWrap
=== modified file 'app/components/ExpandableListItem.qml'
--- app/components/ExpandableListItem.qml 2015-10-22 16:49:23 +0000
+++ app/components/ExpandableListItem.qml 2016-02-16 17:33:54 +0000
@@ -18,7 +18,6 @@
import QtQuick 2.4
import Ubuntu.Components 1.3
-import Ubuntu.Components.ListItems 1.3 as ListItem
/*
Component which extends the SDK Expandable list item and provides a easy
@@ -26,24 +25,19 @@
matches the design specification provided for clock.
*/
-ListItem.Expandable {
+ListItem {
id: expandableListItem
// Public APIs
property ListModel model
property Component delegate
- property alias text: expandableHeader.text
- property alias subText: expandableHeader.subText
+ property alias titleText: expandableHeader.title
+ property alias subText: expandableHeader.subtitle
property alias listViewHeight: expandableList.height
- anchors {
- left: parent.left
- right: parent.right
- margins: units.gu(-2)
- }
-
- collapseOnClick: true
- expandedHeight: contentColumn.height
+ height: expandableHeader.height + divider.height
+ expansion.height: contentColumn.height
+ onClicked: expansion.expanded = !expansion.expanded
Column {
id: contentColumn
@@ -53,26 +47,25 @@
right: parent.right
}
- SubtitledListItem {
- id: expandableHeader
- height: expandableListItem.collapsedHeight
- 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 {}
+ ListItem {
+ height: expandableHeader.height + divider.height
+ ListItemLayout {
+ id: expandableHeader
+
+ Icon {
+ id: arrow
+
+ width: units.gu(2)
+ height: width
+ SlotsLayout.position: SlotsLayout.Trailing
+ SlotsLayout.overrideVerticalPositioning: true
+ anchors.verticalCenter: parent.verticalCenter
+ name: "go-down"
+ rotation: expandableListItem.expansion.expanded ? 180 : 0
+
+ Behavior on rotation {
+ UbuntuNumberAnimation {}
+ }
}
}
}
=== modified file 'app/components/HeaderNavigation.qml'
--- app/components/HeaderNavigation.qml 2015-10-22 16:49:23 +0000
+++ app/components/HeaderNavigation.qml 2016-02-16 17:33:54 +0000
@@ -22,51 +22,34 @@
Item {
id: headerRow
- height: units.gu(7)
+ height: units.gu(6)
Row {
id: iconContainer
anchors.centerIn: parent
+ spacing: units.gu(2)
ActionIcon {
- width: units.gu(5.5)
- height: units.gu(4)
- iconWidth: units.gu(4)
- iconSource: Qt.resolvedUrl("../graphics/WorldClock_Placeholder.svg")
+ iconName: "clock"
+ iconColor: listview.currentIndex == 0 ? "#19b6ee" : "#5d5d5d"
onClicked: listview.currentIndex = 0
}
ActionIcon {
- width: units.gu(5.5)
- height: units.gu(4)
- iconWidth: units.gu(4)
- iconSource: Qt.resolvedUrl("../graphics/Stopwatch_Placeholder.svg")
+ iconName: "stopwatch"
+ iconColor: listview.currentIndex == 1 ? "#19b6ee" : "#5d5d5d"
onClicked: listview.currentIndex = 1
}
- }
-
- Rectangle {
- id: outerProgressRectangle
- anchors {
- left: iconContainer.left
- right: iconContainer.right
- top: iconContainer.bottom
- }
- height: units.gu(0.3)
- color: UbuntuColors.lightGrey
-
- Rectangle {
- height: parent.height
- x: listview.currentIndex == 0 ? 0 : parent.width - width
- width: units.gu(5.5)
- color: UbuntuColors.orange
- Behavior on x {
- UbuntuNumberAnimation {}
- }
- }
- }
-
+
+// ActionIcon {
+// iconName: "timer"
+// iconColor: listview.currentIndex == 2 ? "#19b6ee" : "#5d5d5d"
+// onClicked: listview.currentIndex = 2
+// }
+ }
+
+
ActionIcon {
id: settingsIcon
objectName: "settingsIcon"
@@ -74,7 +57,7 @@
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
- rightMargin: units.gu(2)
+ rightMargin: units.gu(1)
}
iconName: "settings"
=== removed file 'app/components/SubtitledListItem.qml'
--- app/components/SubtitledListItem.qml 2015-10-22 16:49:23 +0000
+++ app/components/SubtitledListItem.qml 1970-01-01 00:00:00 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2014-2015 Canonical Ltd
- *
- * This file is part of Ubuntu Clock App
- *
- * Ubuntu Clock App is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Ubuntu Clock App is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-import QtQuick 2.4
-import Ubuntu.Components 1.3
-
-/*
- This component is almost an identical copy of the SDK's subtitled with the
- exception of the font size and color required by the new clock app design.
-
- #TODO: Revert to using the SDK Subtitled Component when they change the
- design to match the new clock app design.
- */
-ListItem {
- id: _subtitledContainer
-
- // Property to set the main text label
- property alias text: _mainText.text
-
- // Property to set the subtitle label
- property alias subText: _subText.text
-
- Column {
- id: _labelColumn
-
- anchors {
- left: parent.left
- right: parent.right
- margins: units.gu(2)
- verticalCenter: parent.verticalCenter
- }
-
- Label {
- id: _mainText
- fontSize: "medium"
- color: UbuntuColors.midAubergine
- }
-
- Label {
- id: _subText
- fontSize: "xx-small"
- }
- }
-}
=== removed file 'app/graphics/Background_Texture.jpg'
Binary files app/graphics/Background_Texture.jpg 2014-06-19 14:52:15 +0000 and app/graphics/Background_Texture.jpg 1970-01-01 00:00:00 +0000 differ
=== modified file 'app/graphics/CMakeLists.txt'
--- app/graphics/CMakeLists.txt 2016-01-19 12:47:55 +0000
+++ app/graphics/CMakeLists.txt 2016-02-16 17:33:54 +0000
@@ -1,5 +1,4 @@
set(GRAPHICS_FILES
- Background_Texture.jpg
Hour_Hand@xxxxxx
Inner_Clock_Texture@xxxxxx
Knob@xxxxxx
@@ -7,8 +6,6 @@
Second_Hand@xxxxxx
select-none.svg
select.svg
- Stopwatch_Placeholder.svg
- WorldClock_Placeholder.svg
)
# make the files visible in the qtcreator tree
=== modified file 'app/graphics/Hour_Hand@xxxxxx'
Binary files app/graphics/Hour_Hand@xxxxxx 2015-09-04 22:16:01 +0000 and app/graphics/Hour_Hand@xxxxxx 2016-02-16 17:33:54 +0000 differ
=== added file 'app/graphics/Hour_Hand@xxxxxx'
Binary files app/graphics/Hour_Hand@xxxxxx 1970-01-01 00:00:00 +0000 and app/graphics/Hour_Hand@xxxxxx 2016-02-16 17:33:54 +0000 differ
=== modified file 'app/graphics/Inner_Clock_Texture@xxxxxx'
Binary files app/graphics/Inner_Clock_Texture@xxxxxx 2016-01-16 08:18:05 +0000 and app/graphics/Inner_Clock_Texture@xxxxxx 2016-02-16 17:33:54 +0000 differ
=== modified file 'app/graphics/Knob@xxxxxx'
Binary files app/graphics/Knob@xxxxxx 2015-09-04 22:16:01 +0000 and app/graphics/Knob@xxxxxx 2016-02-16 17:33:54 +0000 differ
=== added file 'app/graphics/Knob@xxxxxx'
Binary files app/graphics/Knob@xxxxxx 1970-01-01 00:00:00 +0000 and app/graphics/Knob@xxxxxx 2016-02-16 17:33:54 +0000 differ
=== modified file 'app/graphics/Minute_Hand@xxxxxx'
Binary files app/graphics/Minute_Hand@xxxxxx 2015-09-04 22:16:01 +0000 and app/graphics/Minute_Hand@xxxxxx 2016-02-16 17:33:54 +0000 differ
=== added file 'app/graphics/Minute_Hand@xxxxxx'
Binary files app/graphics/Minute_Hand@xxxxxx 1970-01-01 00:00:00 +0000 and app/graphics/Minute_Hand@xxxxxx 2016-02-16 17:33:54 +0000 differ
=== modified file 'app/graphics/Second_Hand@xxxxxx'
Binary files app/graphics/Second_Hand@xxxxxx 2015-09-04 22:16:01 +0000 and app/graphics/Second_Hand@xxxxxx 2016-02-16 17:33:54 +0000 differ
=== added file 'app/graphics/Second_Hand@xxxxxx'
Binary files app/graphics/Second_Hand@xxxxxx 1970-01-01 00:00:00 +0000 and app/graphics/Second_Hand@xxxxxx 2016-02-16 17:33:54 +0000 differ
=== removed file 'app/graphics/Stopwatch_Placeholder.svg'
--- app/graphics/Stopwatch_Placeholder.svg 2015-09-17 02:36:35 +0000
+++ app/graphics/Stopwatch_Placeholder.svg 1970-01-01 00:00:00 +0000
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg width="100px" height="100px" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
- <!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
- <title>Placeholder Icons</title>
- <desc>Created with Sketch.</desc>
- <defs></defs>
- <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
- <g id="Placeholder-Icons" sketch:type="MSArtboardGroup" stroke="#5B5B5B">
- <g id="Timer-+-Stopwatch-+-Clock-icon" sketch:type="MSLayerGroup" transform="translate(19.000000, 17.000000)">
- <g id="Stopwatch" transform="translate(3.000000, 0.000000)" sketch:type="MSShapeGroup">
- <circle id="Oval-125-Copy" stroke-width="3" cx="28.5" cy="37.5" r="28.5"></circle>
- <path d="M22,1 L34.0300293,1.00149091" id="Line-Copy-3" stroke-width="5" stroke-linecap="square"></path>
- <path d="M26,6 L30.0300293,6.00149091" id="Line-Copy-4" stroke-width="5" stroke-linecap="square"></path>
- <path d="M34.6896914,37.7022985 L34.6896914,22.495895" id="Line-Copy-5" stroke-width="3" stroke-linecap="square" transform="translate(34.689691, 30.099097) rotate(-315.000000) translate(-34.689691, -30.099097) "></path>
- </g>
- </g>
- </g>
- </g>
-</svg>
\ No newline at end of file
=== removed file 'app/graphics/WorldClock_Placeholder.svg'
--- app/graphics/WorldClock_Placeholder.svg 2015-09-17 02:36:35 +0000
+++ app/graphics/WorldClock_Placeholder.svg 1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" width="100px" height="100px" viewBox="0 0 100 100" version="1.1">
- <!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
- <title>Placeholder Icons</title>
- <desc>Created with Sketch.</desc>
- <defs/>
- <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
- <g id="Placeholder-Icons" sketch:type="MSArtboardGroup">
- <g id="Timer-+-Stopwatch-+-Clock-icon" sketch:type="MSLayerGroup" transform="translate(19.000000, 17.000000)">
- <g id="Clock-icon" transform="translate(0.000000, 5.000000)" sketch:type="MSShapeGroup">
- <path d="M19.7838596 0 C2.47304842 0 0 2.5 0 19.9 L0 37.1 C0 54.5 2.5 57 19.8 57 L41.2161404 57 C58.5269504 57 61 54.5 61 37.1 L61 19.9 C61 2.5 58.5 0 41.2 0 L19.7838596 0 L19.7838596 0 Z" id="rect4158" stroke="#5B5B5B" stroke-width="3"/>
- <g id="Hands" transform="translate(17.632812, 16.884454)">
- <path d="M0.026502832 4.2 L12.8671875 11.6" id="path4219" stroke="#5B5B5B" stroke-width="3"/>
- <path d="M12.8671875 11.6 L32.7118814 0.1" id="path4231" stroke="#5B5B5B" stroke-width="2"/>
- <ellipse id="path4221" fill="#5B5B5B" cx="12.9" cy="10.6" rx="4.4" ry="4.4"/>
- <path d="M12.5 11.1 L12.5 31.7" id="path4223" stroke="#5B5B5B"/>
- </g>
- </g>
- </g>
- </g>
- </g>
-</svg>
=== modified file 'app/stopwatch/LapListView.qml'
--- app/stopwatch/LapListView.qml 2015-10-22 16:49:23 +0000
+++ app/stopwatch/LapListView.qml 2016-02-16 17:33:54 +0000
@@ -32,38 +32,38 @@
header: ListItem {
visible: count !== 0
+ width: parent.width - units.gu(4)
+ anchors.horizontalCenter: parent.horizontalCenter
+
Row {
anchors {
left: parent.left
right: parent.right
verticalCenter: parent.verticalCenter
- margins: units.gu(2)
+ margins: units.gu(1)
}
Label {
// #TRANSLATORS: This refers to the stopwatch lap and is shown as a header where space is limited. Constrain
// translation length to a few characters.
text: i18n.tr("Lap")
- width: parent.width / 7
+ width: parent.width /5
elide: Text.ElideRight
- font.weight: Font.DemiBold
- horizontalAlignment: Text.AlignHCenter
+ horizontalAlignment: Text.AlignLeft
}
Label {
- width: 3 * parent.width / 7
+ width: parent.width *2/5
elide: Text.ElideRight
text: i18n.tr("Lap Time")
- font.weight: Font.DemiBold
horizontalAlignment: Text.AlignHCenter
}
Label {
- width: 3 * parent.width / 7
+ width: parent.width *2/5
elide: Text.ElideRight
text: i18n.tr("Total Time")
- font.weight: Font.DemiBold
- horizontalAlignment: Text.AlignHCenter
+ horizontalAlignment: Text.AlignRight
}
}
}
@@ -77,6 +77,9 @@
delegate: ListItem {
divider.visible: true
+ width: parent.width - units.gu(4)
+ anchors.horizontalCenter: parent.horizontalCenter
+
leadingActions: ListItemActions {
actions: [
Action {
@@ -93,18 +96,17 @@
left: parent.left
right: parent.right
verticalCenter: parent.verticalCenter
- margins: units.gu(2)
+ leftMargin: units.gu(1)
}
Label {
- color: UbuntuColors.midAubergine
text: "#%1".arg(Number(count - index).toLocaleString(Qt.locale(), "f", 0))
- width: parent.width / 7
- horizontalAlignment: Text.AlignHCenter
+ width: parent.width/5
+ horizontalAlignment: Text.AlignLeft
}
Item {
- width: 3 * parent.width / 7
+ width: parent.width *2/5
height: childrenRect.height
Row {
anchors.horizontalCenter: parent.horizontalCenter
@@ -112,27 +114,21 @@
text: stopwatchFormatTime.lapTimeToString(model.laptime) + "."
}
Label {
- fontSize: "x-small"
text: stopwatchFormatTime.millisToString(model.laptime)
- anchors.bottom: parent.bottom
- anchors.bottomMargin: units.dp(1)
}
}
}
Item {
- width: 3 * parent.width / 7
+ width: parent.width *2/5
height: childrenRect.height
Row {
- anchors.horizontalCenter: parent.horizontalCenter
+ anchors.right: parent.right
Label {
text: stopwatchFormatTime.lapTimeToString(model.totaltime) + "."
}
Label {
- fontSize: "x-small"
text: stopwatchFormatTime.millisToString(model.totaltime)
- anchors.bottom: parent.bottom
- anchors.bottomMargin: units.dp(1)
}
}
}
=== modified file 'app/stopwatch/StopwatchFace.qml'
--- app/stopwatch/StopwatchFace.qml 2015-10-22 16:49:23 +0000
+++ app/stopwatch/StopwatchFace.qml 2016-02-16 17:33:54 +0000
@@ -22,41 +22,35 @@
import "../components"
ClockCircle {
- id: outerCirle
+ id: stopwatchCircle
// Property to hold the total time (in milliseconds)
property int milliseconds: 0
- isOuter: true
- width: units.gu(32)
+ width: units.gu(24)
StopwatchFormatTime {
id: stopwatchFormatTime
}
- ClockCircle {
- id: innerCircle
-
- width: units.gu(23)
- anchors.centerIn: parent
- }
-
- Column {
- id: text
-
- anchors.centerIn: parent
-
- Label {
- text: stopwatchFormatTime.millisToTimeString(milliseconds, true)
- font.pixelSize: units.dp(34)
- color: UbuntuColors.midAubergine
- }
-
- Label {
- text: stopwatchFormatTime.millisToString(milliseconds)
- font.pixelSize: units.dp(18)
- color: UbuntuColors.midAubergine
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
+ Label {
+ id: time
+
+ text: stopwatchFormatTime.millisToTimeString(milliseconds, true)
+ font.pixelSize: units.dp(36)
+ anchors.centerIn: parent
+ }
+
+ Label {
+ id: miliseconds
+
+ text: stopwatchFormatTime.millisToString(milliseconds)
+ textSize: Label.Large
+ anchors {
+ top: time.bottom
+ topMargin: units.gu(1.5)
+ horizontalCenter: parent.horizontalCenter
+ }
+ }
+
}
=== modified file 'app/stopwatch/StopwatchPage.qml'
--- app/stopwatch/StopwatchPage.qml 2015-10-22 16:49:23 +0000
+++ app/stopwatch/StopwatchPage.qml 2016-02-16 17:33:54 +0000
@@ -47,13 +47,14 @@
}
}
- Row {
+ Item {
id: buttonRow
- spacing: units.gu(2)
+ width: parent.width - units.gu(4)
+ height: units.gu(4)
anchors {
top: stopwatch.bottom
- topMargin: units.gu(3)
+ topMargin: units.gu(4)
left: parent.left
right: parent.right
margins: units.gu(2)
@@ -61,7 +62,9 @@
Button {
id: stopButton
- width: stopwatchEngine.previousTimeOfStopwatch !== 0 || stopwatchEngine.running ? (parent.width - parent.spacing) / 2 : parent.width
+ width: units.gu(17)
+ height: units.gu(4)
+ x: stopwatchEngine.previousTimeOfStopwatch !== 0 || stopwatchEngine.running ? parent.width/2 - width - units.gu(1) : (parent.width - width)/2
color: !stopwatchEngine.running ? UbuntuColors.green : UbuntuColors.red
text: stopwatchEngine.running ? i18n.tr("Stop") : (stopwatchEngine.previousTimeOfStopwatch === 0 ? i18n.tr("Start") : i18n.tr("Resume"))
onClicked: {
@@ -71,7 +74,7 @@
stopwatchEngine.startStopwatch();
}
}
- Behavior on width {
+ Behavior on x {
UbuntuNumberAnimation{
duration: UbuntuAnimation.BriskDuration
}
@@ -81,8 +84,10 @@
Button {
id: lapButton
text: stopwatchEngine.running ? i18n.tr("Lap") : i18n.tr("Clear")
- width: stopwatchEngine.previousTimeOfStopwatch !== 0 || stopwatchEngine.running ? (parent.width - parent.spacing) / 2 : 0
- strokeColor: UbuntuColors.lightGrey
+ width: units.gu(17)
+ height: units.gu(4)
+ x: stopwatchEngine.previousTimeOfStopwatch !== 0 || stopwatchEngine.running ? parent.width/2 + units.gu(1) : parent.width
+ color: "#f7f7f7"
visible: stopwatchEngine.previousTimeOfStopwatch !== 0 || stopwatchEngine.running
onClicked: {
if (stopwatchEngine.running) {
@@ -91,7 +96,7 @@
stopwatchEngine.clearStopwatch()
}
}
- Behavior on width {
+ Behavior on x {
UbuntuNumberAnimation{
duration: UbuntuAnimation.BriskDuration
}
=== modified file 'app/ubuntu-clock-app.qml'
--- app/ubuntu-clock-app.qml 2015-10-22 16:49:23 +0000
+++ app/ubuntu-clock-app.qml 2016-02-16 17:33:54 +0000
@@ -49,12 +49,10 @@
width: units.gu(40)
height: units.gu(70)
- backgroundColor: "#F5F5F5"
+ backgroundColor: "#FFFFFF"
anchorToKeyboard: true
- Background {}
-
// Database to store the user preferences locally
U1db.Database {
id: clockDB
=== modified file 'app/upstreamcomponents/FastScroll.qml'
--- app/upstreamcomponents/FastScroll.qml 2015-10-22 16:49:23 +0000
+++ app/upstreamcomponents/FastScroll.qml 2016-02-16 17:33:54 +0000
@@ -102,7 +102,7 @@
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: internal.desireSection
- fontSize: "small"
+ textSize: Label.Small
}
Behavior on opacity {
@@ -179,7 +179,7 @@
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
text: modelData
- fontSize: "x-small"
+ textSize: Label.XSmall
color: cursor.y === y ? "white" : Theme.palette.selected.backgroundText
opacity: !internal.modelDirty && Sections.contains(text) ? 1.0 : 0.5
}
=== modified file 'app/worldclock/AddWorldCityButton.qml'
--- app/worldclock/AddWorldCityButton.qml 2015-10-22 16:49:23 +0000
+++ app/worldclock/AddWorldCityButton.qml 2016-02-16 17:33:54 +0000
@@ -28,7 +28,6 @@
Label {
text: i18n.tr("Add")
- color: UbuntuColors.midAubergine
anchors {
right: _addButton.left
rightMargin: units.gu(1)
@@ -39,7 +38,6 @@
ClockCircle {
id: _addButton
- isOuter: true
width: units.gu(5)
anchors {
horizontalCenter: parent.horizontalCenter
@@ -47,23 +45,18 @@
topMargin: units.gu(1)
}
- ClockCircle {
- width: units.gu(3.5)
+ Icon {
anchors.centerIn: parent
-
- Icon {
- anchors.centerIn: parent
- color: UbuntuColors.coolGrey
- name: "add"
- height: units.gu(2)
- width: height
- }
+ color: UbuntuColors.coolGrey
+ name: "add"
+ height: units.gu(2)
+ width: height
}
}
+
Label {
text: i18n.tr("City")
- color: UbuntuColors.midAubergine
anchors {
left: _addButton.right
leftMargin: units.gu(1)
=== modified file 'app/worldclock/UserWorldCityDelegate.qml'
--- app/worldclock/UserWorldCityDelegate.qml 2015-10-22 16:49:23 +0000
+++ app/worldclock/UserWorldCityDelegate.qml 2016-02-16 17:33:54 +0000
@@ -31,7 +31,7 @@
return [hours, minutes]
}
- height: units.gu(9)
+ height: units.gu(10)
divider.visible: false
Item {
@@ -55,17 +55,19 @@
Label {
text: model.cityName
objectName: "userCityNameText"
+ textSize: Label.Small
width: parent.width
elide: Text.ElideRight
- color: UbuntuColors.midAubergine
+ color: "#5d5d5d"
}
Label {
text: model.countryName
objectName: "userCountryNameText"
- fontSize: "xx-small"
+ textSize: Label.Small
width: parent.width
elide: Text.ElideRight
+ color: "#888888"
}
}
@@ -73,9 +75,8 @@
id: localTimeVisual
objectName: "localTimeVisual" + index
- fontSize: units.dp(14)
periodFontSize: units.dp(7)
- innerCircleWidth: units.gu(5)
+ innerCircleWidth: units.gu(7)
width: units.gu(7)
notLocalizedDateTimeString: model.notLocalizedZoneTime
@@ -120,7 +121,8 @@
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
- fontSize: "xx-small"
+ color: "#5d5d5d"
+ textSize: Label.Small
wrapMode: Text.WordWrap
maximumLineCount: 2
elide: Text.ElideRight
=== modified file 'app/worldclock/WorldCityList.qml'
--- app/worldclock/WorldCityList.qml 2015-12-11 02:13:16 +0000
+++ app/worldclock/WorldCityList.qml 2016-02-16 17:33:54 +0000
@@ -321,45 +321,16 @@
}
delegate: ListItem {
- height: worldCityDelegateColumn.height + units.gu(2)
divider.visible: false
objectName: "defaultWorldCityItem" + index
-
- Column {
- id: worldCityDelegateColumn
-
- anchors {
- left: parent.left
- leftMargin: units.gu(2)
- right: _localTime.left
- rightMargin: units.gu(1)
- verticalCenter: parent.verticalCenter
- }
-
- Label {
- text: cityName
- objectName: "defaultCityNameText"
- width: parent.width
- elide: Text.ElideRight
- color: UbuntuColors.midAubergine
- }
-
- Label {
- text: countryName
- objectName: "defaultCountryNameText"
- fontSize: "xx-small"
- width: parent.width
- elide: Text.ElideRight
- }
- }
-
- Label {
- id: _localTime
- text: localizedZoneTime
- anchors {
- right: parent.right
- rightMargin: units.gu(2)
- verticalCenter: parent.verticalCenter
+ ListItemLayout {
+ title.text: cityName
+ subtitle.text: countryName
+
+ Label {
+ id: _localTime
+ text: localizedZoneTime
+ SlotsLayout.position: SlotsLayout.Trailing
}
}
=== modified file 'backend/modules/Stopwatch/formattime.cpp'
--- backend/modules/Stopwatch/formattime.cpp 2015-08-26 22:47:23 +0000
+++ backend/modules/Stopwatch/formattime.cpp 2016-02-16 17:33:54 +0000
@@ -65,14 +65,5 @@
QString FormatTime::lapTimeToString(int millis) const
{
- int hours = qFloor(millis / 1000 / 60 / 60);
-
- if (hours > 0)
- {
- return millisToTimeString(millis, true);
- }
-
- else {
- return millisToTimeString(millis, false);
- }
+ return millisToTimeString(millis, true);
}
Follow ups
-
[Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: noreply, 2016-02-25
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-25
-
[Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Nekhelesh Ramananthan, 2016-02-25
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Nekhelesh Ramananthan, 2016-02-25
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-25
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-25
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-25
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-22
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-21
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-20
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-18
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-18
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-18
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-17
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Bartosz Kosiorek, 2016-02-17
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Bartosz Kosiorek, 2016-02-17
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-17
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-17
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-17
-
Re: [Merge] lp:~ubuntu-clock-dev/ubuntu-clock-app/ubuntu-clock-app-new-design into lp:ubuntu-clock-app
From: Jenkins Bot, 2016-02-16