on xenial help sign in
Don't undo clock date label binding, rather just force it to regenerate itself
commitc584e65ef526937ea76a8c0de5314205c667b440 authorMichael Terry <michael.terry@canonical.com> dateFri 21 Nov 2014, 14:23 (12 years ago) parent35fd20a
1 file changed+10−10
qml/Greeter/Clock.qml+10−10
qml/Greeter/Clock.qml+10−10
@@ -34,6 +34,16 @@ Item {
3434 }
3535 }
3636
37+ Connections {
38+ target: i18n
39+ onLanguageChanged: {
40+ if (visible) {
41+ timeLabel.text = Qt.formatTime(clock.currentDate); // kicks time
42+ clock.currentDate = new Date(); // kicks date
43+ }
44+ }
45+ }
46+
3747 Indicators.SharedUnityMenuModel {
3848 id: timeModel
3949 objectName: "timeModel"
@@ -66,11 +76,6 @@ Item {
6676 opacity: 0.5
6777 text: Qt.formatTime(clock.currentDate)
6878 font.weight: Font.Light
69−
70− Connections {
71− target: i18n
72− onLanguageChanged: timeLabel.text = Qt.formatTime(clock.currentDate)
73− }
7479 }
7580
7681 Label {
@@ -83,11 +88,6 @@ Item {
8388 opacity: 0.5
8489 text: Qt.formatDate(clock.currentDate, Qt.DefaultLocaleLongDate)
8590 font.weight: Font.Light
86−
87− Connections {
88− target: i18n
89− onLanguageChanged: dateLabel.text = Qt.formatDate(clock.currentDate, Qt.DefaultLocaleLongDate)
90− }
9191 }
9292 }
9393}