bugfix/5-increase-avatar-size-and-font-conrtast #6
41
components/Clock.qml
Normal file
41
components/Clock.qml
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2016 David Edmundson <davidedmundson@kde.org>
|
||||
|
||||
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
|
||||
}
|
||||
}
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user