Merge lp:~mutse-young/night-clock/trunk into lp:night-clock

Proposed by mutse
Status: Needs review
Proposed branch: lp:~mutse-young/night-clock/trunk
Merge into: lp:night-clock
Diff against target: 76 lines (+25/-1)
3 files modified
Main.qml (+4/-0)
qml/Display.qml (+1/-1)
qml/Settings.qml (+20/-0)
To merge this branch: bzr merge lp:~mutse-young/night-clock/trunk
Reviewer Review Type Date Requested Status
Michal Predotka Pending
Review via email: mp+279684@code.launchpad.net

Commit message

add date format setting

To post a comment you must log in.
Revision history for this message
Michal Predotka (mpredotka) wrote :

Hi mutse!

Many thanks for your code proposition. I really appreciate it. I hope it will not be a problem if I don't merge your code this time. It is because I plan to add an option for even more date formats.

Regards,
Michal

Revision history for this message
mutse (mutse-young) wrote :

Hi, Michal!

I have update the night clock, it is so cool! I am like it so much! I hope
you can add an option for more colors.

Thanks!

2015年12月7日星期一,Michal Predotka <email address hidden> 写道:
> Hi mutse!
>
> Many thanks for your code proposition. I really appreciate it. I hope it
will not be a problem if I don't merge your code this time. It is because I
plan to add an option for even more date formats.
>
> Regards,
> Michal
> --
> https://code.launchpad.net/~mutse-young/night-clock/trunk/+merge/279684
> You are the owner of lp:~mutse-young/night-clock/trunk.
>

Unmerged revisions

5. By mutse

add date format setting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Main.qml'
--- Main.qml 2015-12-05 23:05:57 +0000
+++ Main.qml 2015-12-06 07:50:46 +0000
@@ -10,10 +10,12 @@
10 property bool isFullscreen: true10 property bool isFullscreen: true
11 property bool isLandscape: main_view.width > main_view.height11 property bool isLandscape: main_view.width > main_view.height
12 property bool is24format: true12 property bool is24format: true
13 property bool isdateformat: false
13 property string time_24: "00:00"14 property string time_24: "00:00"
14 property string time_12: "00:00:ap"15 property string time_12: "00:00:ap"
15 property string this_day: Qt.formatDateTime(new Date(), "dddd")16 property string this_day: Qt.formatDateTime(new Date(), "dddd")
16 property string this_date: Qt.formatDateTime(new Date(), "d MMMM yyyy")17 property string this_date: Qt.formatDateTime(new Date(), "d MMMM yyyy")
18 property string standard_date: Qt.formatDateTime(new Date(), "yyyy MMMM d")
17 property color back_color: "#000"19 property color back_color: "#000"
18 property color text_color: UbuntuColors.red20 property color text_color: UbuntuColors.red
1921
@@ -23,6 +25,7 @@
23 time_12 = Qt.formatDateTime(new Date(), "hh:mm:ap")25 time_12 = Qt.formatDateTime(new Date(), "hh:mm:ap")
24 this_day = Qt.formatDateTime(new Date(), "dddd")26 this_day = Qt.formatDateTime(new Date(), "dddd")
25 this_date = Qt.formatDateTime(new Date(), "d MMMM yyyy")27 this_date = Qt.formatDateTime(new Date(), "d MMMM yyyy")
28 standard_date = Qt.formatDateTime(new Date(), "yyyy MMMM d")
26 }29 }
2730
28 width: units.gu(40)31 width: units.gu(40)
@@ -48,6 +51,7 @@
48 property alias foreground_colour: root_window.text_color51 property alias foreground_colour: root_window.text_color
49 property alias is_fullscreen: root_window.isFullscreen52 property alias is_fullscreen: root_window.isFullscreen
50 property alias is_24_format: root_window.is24format53 property alias is_24_format: root_window.is24format
54 property alias is_sd_format: root_window.isdateformat
51 }55 }
5256
53 Connections {57 Connections {
5458
=== modified file 'qml/Display.qml'
--- qml/Display.qml 2015-12-05 23:11:51 +0000
+++ qml/Display.qml 2015-12-06 07:50:46 +0000
@@ -132,7 +132,7 @@
132 id: date_label132 id: date_label
133133
134 color: text_color134 color: text_color
135 text: this_date135 text: isdateformat ? standard_date : this_date
136 anchors {136 anchors {
137 top: day_label.bottom137 top: day_label.bottom
138 topMargin: units.gu(1)138 topMargin: units.gu(1)
139139
=== modified file 'qml/Settings.qml'
--- qml/Settings.qml 2015-12-03 10:36:47 +0000
+++ qml/Settings.qml 2015-12-06 07:50:46 +0000
@@ -149,6 +149,26 @@
149 }149 }
150150
151 ListItem {151 ListItem {
152 id: show_date_setting_item
153
154 RowLayout {
155 anchors.fill: parent
156
157 Label {
158 text: i18n.tr("Standard date format")
159 anchors.verticalCenter: parent.verticalCenter
160 Layout.fillWidth: true
161 }
162
163 Switch {
164 anchors.verticalCenter: parent.verticalCenter
165 checked: isdateformat
166 onCheckedChanged: isdateformat = checked
167 }
168 }
169 }
170
171 ListItem {
152 id: text_color_setting_item172 id: text_color_setting_item
153173
154 Column {174 Column {

Subscribers

People subscribed via source and target branches

to all changes: