diff --git a/components/Clock.qml b/components/Clock.qml new file mode 100644 index 0000000..1d2d42e --- /dev/null +++ b/components/Clock.qml @@ -0,0 +1,41 @@ +/* + SPDX-FileCopyrightText: 2016 David Edmundson + + SPDX-License-Identifier: LGPL-2.0-or-later +*/ + +import QtQuick 2.8 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.5 as QQC2 +import org.kde.plasma.core 2.0 as PlasmaCore + +ColumnLayout { + readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software + + QQC2.Label { + text: Qt.formatTime(timeSource.data["Local"]["DateTime"]) + color: PlasmaCore.ColorScope.textColor + // style: softwareRendering ? Text.Outline : Text.Normal + // styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter + style: Text.Outline + styleColor: "gray" + font.pointSize: 48 + Layout.alignment: Qt.AlignHCenter + } + QQC2.Label { + text: Qt.formatDate(timeSource.data["Local"]["DateTime"], Qt.DefaultLocaleLongDate) + color: PlasmaCore.ColorScope.textColor + // style: softwareRendering ? Text.Outline : Text.Normal + // styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter + style: Text.Outline + styleColor: "gray" + font.pointSize: 24 + Layout.alignment: Qt.AlignHCenter + } + PlasmaCore.DataSource { + id: timeSource + engine: "time" + connectedSources: ["Local"] + interval: 1000 + } +} diff --git a/components/UserDelegate.qml b/components/UserDelegate.qml index 1582188..4be9a78 100644 --- a/components/UserDelegate.qml +++ b/components/UserDelegate.qml @@ -30,9 +30,9 @@ Item { property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 2 signal clicked() - property real faceSize: PlasmaCore.Units.gridUnit * 7 + property real faceSize: PlasmaCore.Units.gridUnit * 10 - opacity: isCurrent ? 1.0 : 0.5 + opacity: isCurrent ? 1.0 : 0.75 Behavior on opacity { OpacityAnimator { @@ -64,7 +64,7 @@ Item { duration: PlasmaCore.Units.longDuration; } } - width: isCurrent ? faceSize : faceSize - PlasmaCore.Units.largeSpacing + width: isCurrent ? faceSize : faceSize * 0.75 height: width //Image takes priority, taking a full path to a file, if that doesn't exist we show an icon @@ -152,15 +152,18 @@ Item { id: usernameDelegate // Make it bigger than other fonts to match the scale of the avatar better - font.pointSize: wrapper.fontSize + 4 + font.pointSize: wrapper.fontSize + 10 anchors { bottom: parent.bottom horizontalCenter: parent.horizontalCenter } width: constrainText ? parent.width : implicitWidth text: wrapper.name - style: softwareRendering ? Text.Outline : Text.Normal - styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter + // style: softwareRendering ? Text.Outline : Text.Normal + // styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter + style: Text.Outline + styleColor: "gray" + // Text { font.pointSize: 18; text: "hello"; style: Text.Raised; styleColor: "gray" } color: 'white' elide: Text.ElideRight horizontalAlignment: Text.AlignHCenter diff --git a/components/UserList.qml b/components/UserList.qml index 49f38eb..afe829b 100644 --- a/components/UserList.qml +++ b/components/UserList.qml @@ -10,8 +10,8 @@ import org.kde.plasma.core 2.0 as PlasmaCore ListView { id: view readonly property string selectedUser: currentItem ? currentItem.userName : "" - readonly property int userItemWidth: PlasmaCore.Units.gridUnit * 8 - readonly property int userItemHeight: PlasmaCore.Units.gridUnit * 8 + readonly property int userItemWidth: PlasmaCore.Units.gridUnit * 11 + readonly property int userItemHeight: PlasmaCore.Units.gridUnit * 11 property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 2 implicitHeight: userItemHeight