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
1=== modified file 'Main.qml'
2--- Main.qml 2015-12-05 23:05:57 +0000
3+++ Main.qml 2015-12-06 07:50:46 +0000
4@@ -10,10 +10,12 @@
5 property bool isFullscreen: true
6 property bool isLandscape: main_view.width > main_view.height
7 property bool is24format: true
8+ property bool isdateformat: false
9 property string time_24: "00:00"
10 property string time_12: "00:00:ap"
11 property string this_day: Qt.formatDateTime(new Date(), "dddd")
12 property string this_date: Qt.formatDateTime(new Date(), "d MMMM yyyy")
13+ property string standard_date: Qt.formatDateTime(new Date(), "yyyy MMMM d")
14 property color back_color: "#000"
15 property color text_color: UbuntuColors.red
16
17@@ -23,6 +25,7 @@
18 time_12 = Qt.formatDateTime(new Date(), "hh:mm:ap")
19 this_day = Qt.formatDateTime(new Date(), "dddd")
20 this_date = Qt.formatDateTime(new Date(), "d MMMM yyyy")
21+ standard_date = Qt.formatDateTime(new Date(), "yyyy MMMM d")
22 }
23
24 width: units.gu(40)
25@@ -48,6 +51,7 @@
26 property alias foreground_colour: root_window.text_color
27 property alias is_fullscreen: root_window.isFullscreen
28 property alias is_24_format: root_window.is24format
29+ property alias is_sd_format: root_window.isdateformat
30 }
31
32 Connections {
33
34=== modified file 'qml/Display.qml'
35--- qml/Display.qml 2015-12-05 23:11:51 +0000
36+++ qml/Display.qml 2015-12-06 07:50:46 +0000
37@@ -132,7 +132,7 @@
38 id: date_label
39
40 color: text_color
41- text: this_date
42+ text: isdateformat ? standard_date : this_date
43 anchors {
44 top: day_label.bottom
45 topMargin: units.gu(1)
46
47=== modified file 'qml/Settings.qml'
48--- qml/Settings.qml 2015-12-03 10:36:47 +0000
49+++ qml/Settings.qml 2015-12-06 07:50:46 +0000
50@@ -149,6 +149,26 @@
51 }
52
53 ListItem {
54+ id: show_date_setting_item
55+
56+ RowLayout {
57+ anchors.fill: parent
58+
59+ Label {
60+ text: i18n.tr("Standard date format")
61+ anchors.verticalCenter: parent.verticalCenter
62+ Layout.fillWidth: true
63+ }
64+
65+ Switch {
66+ anchors.verticalCenter: parent.verticalCenter
67+ checked: isdateformat
68+ onCheckedChanged: isdateformat = checked
69+ }
70+ }
71+ }
72+
73+ ListItem {
74 id: text_color_setting_item
75
76 Column {

Subscribers

People subscribed via source and target branches

to all changes: