← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~nik90/ubuntu-clock-app/increase-alarm-height into lp:ubuntu-clock-app

 

Nekhelesh Ramananthan has proposed merging lp:~nik90/ubuntu-clock-app/increase-alarm-height into lp:ubuntu-clock-app.

Commit message:
Increased the height of the alarm times as per new design spec.

Requested reviews:
  Ubuntu Clock Developers (ubuntu-clock-dev)
Related bugs:
  Bug #1365428 in Ubuntu Clock App: "[clock][ux] increase the height of times in the alarms screen"
  https://bugs.launchpad.net/ubuntu-clock-app/+bug/1365428

For more details, see:
https://code.launchpad.net/~nik90/ubuntu-clock-app/increase-alarm-height/+merge/266864

Increase the height of alarm times as per new design spec detailed in [1].

[1] https://docs.google.com/presentation/d/1zByPoFIm_-V7E3tGu5l_t9s4MUxu34v9ZdlsfvCIFq4/edit#slide=id.g18883f09d_05
-- 
Your team Ubuntu Clock Developers is requested to review the proposed merge of lp:~nik90/ubuntu-clock-app/increase-alarm-height into lp:ubuntu-clock-app.
=== modified file 'app/alarm/AlarmDelegate.qml'
--- app/alarm/AlarmDelegate.qml	2015-07-24 13:32:46 +0000
+++ app/alarm/AlarmDelegate.qml	2015-08-04 12:37:44 +0000
@@ -17,6 +17,7 @@
  */
 
 import QtQuick 2.4
+import QtQuick.Layouts 1.1
 import Ubuntu.Components 1.2
 
 ListItem {
@@ -25,58 +26,63 @@
     property var localTime
 
     width: parent ? parent.width : 0
-    height: units.gu(6)
+    height: units.gu(9)
     divider.visible: false
 
-    Label {
-        id: alarmTime
-        objectName: "listAlarmTime" + index
+    Column {
+        id: alarmDetailsColumn
+
+        spacing: units.gu(1)
+        opacity: model.enabled ? 1.0 : 0.8
 
         anchors {
-            top: alarmDetailsColumn.top
             left: parent.left
             leftMargin: units.gu(2)
-        }
-
-        fontSize: "medium"
-        text: Qt.formatTime(date)
-        opacity: model.enabled ? 1.0 : 0.8
-    }
-
-    Column {
-        id: alarmDetailsColumn
-
-        opacity: model.enabled ? 1.0 : 0.8
-
-        anchors {
-            left: alarmTime.right
             right: alarmStatus.left
+            rightMargin: units.gu(1)
             verticalCenter: parent.verticalCenter
-            margins: units.gu(1)
         }
 
         Label {
-            id: alarmLabel
-            objectName: "listAlarmLabel" + index
+            id: alarmTime
+            objectName: "listAlarmTime" + index
 
-            text: message
-            fontSize: "medium"
-            width: parent.width
-            elide: Text.ElideRight
             color: UbuntuColors.midAubergine
+            fontSize: "x-large"
+            text: Qt.formatTime(date)
         }
 
-        Label {
-            id: alarmSubtitle
-            objectName: "listAlarmSubtitle" + index
-
-            fontSize: "xx-small"
+        RowLayout {
             width: parent.width
-            visible: !(type === Alarm.OneTime && !model.enabled)
-            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
-            text: type === Alarm.Repeating ? alarmUtils.format_day_string(daysOfWeek, type)
-                                           : model.enabled ? alarmUtils.get_time_to_next_alarm(model.date - localTime)
-                                                           : "Alarm Disabled"
+            spacing: units.gu(1)
+
+            Label {
+                id: alarmLabel
+                objectName: "listAlarmLabel" + index
+
+                text: message
+                fontSize: "small"
+                elide: Text.ElideRight
+                Layout.maximumWidth: parent.width/4
+            }
+
+            Label {
+                text: "|"
+                visible: alarmSubtitle.visible
+            }
+
+            Label {
+                id: alarmSubtitle
+                objectName: "listAlarmSubtitle" + index
+
+                fontSize: "small"
+                Layout.fillWidth: true
+                visible: !(type === Alarm.OneTime && !model.enabled)
+                elide: Text.ElideRight
+                text: type === Alarm.Repeating ? alarmUtils.format_day_string(daysOfWeek, type)
+                                               : model.enabled ? alarmUtils.get_time_to_next_alarm(model.date - localTime)
+                                                               : "Alarm Disabled"
+            }
         }
     }
 

=== modified file 'app/alarm/AlarmUtils.qml'
--- app/alarm/AlarmUtils.qml	2015-05-27 16:03:23 +0000
+++ app/alarm/AlarmUtils.qml	2015-08-04 12:37:44 +0000
@@ -222,31 +222,31 @@
         var occurs = []
 
         if (value & Alarm.Monday) {
-            occurs.push(Qt.locale().standaloneDayName(1, Locale.LongFormat))
+            occurs.push(Qt.locale().standaloneDayName(1, Locale.ShortFormat))
         }
 
         if (value & Alarm.Tuesday) {
-            occurs.push(Qt.locale().standaloneDayName(2, Locale.LongFormat))
+            occurs.push(Qt.locale().standaloneDayName(2, Locale.ShortFormat))
         }
 
         if (value & Alarm.Wednesday) {
-            occurs.push(Qt.locale().standaloneDayName(3, Locale.LongFormat))
+            occurs.push(Qt.locale().standaloneDayName(3, Locale.ShortFormat))
         }
 
         if (value & Alarm.Thursday) {
-            occurs.push(Qt.locale().standaloneDayName(4, Locale.LongFormat))
+            occurs.push(Qt.locale().standaloneDayName(4, Locale.ShortFormat))
         }
 
         if (value & Alarm.Friday) {
-            occurs.push(Qt.locale().standaloneDayName(5, Locale.LongFormat))
+            occurs.push(Qt.locale().standaloneDayName(5, Locale.ShortFormat))
         }
 
         if (value & Alarm.Saturday) {
-            occurs.push(Qt.locale().standaloneDayName(6, Locale.LongFormat))
+            occurs.push(Qt.locale().standaloneDayName(6, Locale.ShortFormat))
         }
 
         if (value & Alarm.Sunday) {
-            occurs.push(Qt.locale().standaloneDayName(0, Locale.LongFormat))
+            occurs.push(Qt.locale().standaloneDayName(0, Locale.ShortFormat))
         }
 
         occurs = occurs.join(', ');

=== modified file 'debian/changelog'
--- debian/changelog	2015-08-01 01:07:23 +0000
+++ debian/changelog	2015-08-04 12:37:44 +0000
@@ -1,6 +1,10 @@
 ubuntu-clock-app (3.5) UNRELEASED; urgency=medium
 
+  [Bartosz Kosiorek]
   * Disable automatic translation and update README.translations
+  
+  [Nekhelesh Ramananthan]
+  * Increase the height of times in the alarm screen (LP: #1365428)
 
  -- Bartosz Kosiorek <gang65@xxxxxxxxxxxxxx>  Fri, 24 Jul 2015 18:05:38 +0200
 


Follow ups