bugfix/5-increase-avatar-size-and-font-conrtast #6

Merged
hygienic-books merged 3 commits from bugfix/5-increase-avatar-size-and-font-conrtast into master 2022-03-06 20:18:13 +00:00
3 changed files with 52 additions and 8 deletions
Showing only changes of commit 53de25cc27 - Show all commits

41
components/Clock.qml Normal file
View 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
}
}

View File

@ -30,9 +30,9 @@ Item {
property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 2 property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 2
signal clicked() 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 { Behavior on opacity {
OpacityAnimator { OpacityAnimator {
@ -64,7 +64,7 @@ Item {
duration: PlasmaCore.Units.longDuration; duration: PlasmaCore.Units.longDuration;
} }
} }
width: isCurrent ? faceSize : faceSize - PlasmaCore.Units.largeSpacing width: isCurrent ? faceSize : faceSize * 0.75
height: width height: width
//Image takes priority, taking a full path to a file, if that doesn't exist we show an icon //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 id: usernameDelegate
// Make it bigger than other fonts to match the scale of the avatar better // 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 { anchors {
bottom: parent.bottom bottom: parent.bottom
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
} }
width: constrainText ? parent.width : implicitWidth width: constrainText ? parent.width : implicitWidth
text: wrapper.name text: wrapper.name
style: softwareRendering ? Text.Outline : Text.Normal // style: softwareRendering ? Text.Outline : Text.Normal
styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter // 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' color: 'white'
elide: Text.ElideRight elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter

View File

@ -10,8 +10,8 @@ import org.kde.plasma.core 2.0 as PlasmaCore
ListView { ListView {
id: view id: view
readonly property string selectedUser: currentItem ? currentItem.userName : "" readonly property string selectedUser: currentItem ? currentItem.userName : ""
readonly property int userItemWidth: PlasmaCore.Units.gridUnit * 8 readonly property int userItemWidth: PlasmaCore.Units.gridUnit * 11
readonly property int userItemHeight: PlasmaCore.Units.gridUnit * 8 readonly property int userItemHeight: PlasmaCore.Units.gridUnit * 11
property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 2 property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 2
implicitHeight: userItemHeight implicitHeight: userItemHeight