Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/components/Clock.qml
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 35 | DropShadow { | |||
---|---|---|---|---|---|
44 | spread: 0.3 | 44 | spread: 0.3 | ||
45 | color: "black" // matches Breeze window decoration and desktopcontainment | 45 | color: "black" // matches Breeze window decoration and desktopcontainment | ||
46 | } | 46 | } | ||
47 | 47 | | |||
48 | ColumnLayout { | 48 | ColumnLayout { | ||
49 | id: clock | 49 | id: clock | ||
50 | Label { | 50 | Label { | ||
51 | text: Qt.formatTime(timeSource.data["Local"]["DateTime"]) | 51 | text: Qt.formatTime(timeSource.data["Local"]["DateTime"]) | ||
52 | style: softwareRendering ? Text.Outline : undefined | 52 | style: softwareRendering ? Text.Outline : Text.Normal | ||
53 | styleColor: softwareRendering ? ColorScope.backgroundColor : undefined | 53 | styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter | ||
54 | font.pointSize: 48 | 54 | font.pointSize: 48 | ||
55 | Layout.alignment: Qt.AlignHCenter | 55 | Layout.alignment: Qt.AlignHCenter | ||
56 | } | 56 | } | ||
57 | Label { | 57 | Label { | ||
58 | text: Qt.formatDate(timeSource.data["Local"]["DateTime"], Qt.DefaultLocaleLongDate) | 58 | text: Qt.formatDate(timeSource.data["Local"]["DateTime"], Qt.DefaultLocaleLongDate) | ||
59 | style: softwareRendering ? Text.Outline : undefined | 59 | style: softwareRendering ? Text.Outline : Text.Normal | ||
60 | styleColor: softwareRendering ? ColorScope.backgroundColor : undefined | 60 | styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter | ||
61 | font.pointSize: 24 | 61 | font.pointSize: 24 | ||
62 | Layout.alignment: Qt.AlignHCenter | 62 | Layout.alignment: Qt.AlignHCenter | ||
63 | } | 63 | } | ||
64 | DataSource { | 64 | DataSource { | ||
65 | id: timeSource | 65 | id: timeSource | ||
66 | engine: "time" | 66 | engine: "time" | ||
67 | connectedSources: ["Local"] | 67 | connectedSources: ["Local"] | ||
68 | interval: 1000 | 68 | interval: 1000 | ||
69 | } | 69 | } | ||
70 | } | 70 | } | ||
71 | } | 71 | } |