From 513ec11c4270c1ae1bfae96646e1eecc07e69227 Mon Sep 17 00:00:00 2001 From: wackyideas <17151-wackyideas@users.noreply.gitgud.io> Date: Fri, 2 Sep 2022 08:53:07 +0200 Subject: [PATCH] Fixed avatar icon smoothness, fixed calendar spacing. --- .../contents/ui/CalendarView.qml | 6 ++-- .../contents/ui/MenuRepresentation.qml | 28 ++++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/Plasma/Plasma Widgets/User/Date and Time/org.kde.plasma.digitalclocklite/contents/ui/CalendarView.qml b/Plasma/Plasma Widgets/User/Date and Time/org.kde.plasma.digitalclocklite/contents/ui/CalendarView.qml index 8650ab1..fbdc523 100644 --- a/Plasma/Plasma Widgets/User/Date and Time/org.kde.plasma.digitalclocklite/contents/ui/CalendarView.qml +++ b/Plasma/Plasma Widgets/User/Date and Time/org.kde.plasma.digitalclocklite/contents/ui/CalendarView.qml @@ -106,13 +106,15 @@ PlasmaCore.Dialog { //y: 0 // The "sensible" values - property int _minimumWidth: (showAgenda ? agendaViewWidth : 0) + monthViewWidth - property int _minimumHeight: PlasmaCore.Units.gridUnit * 12 + //Layout.preferredWidth: _minimumWidth //Layout.preferredHeight: _minimumHeight * 1.5 readonly property bool showAgenda: PlasmaCalendar.EventPluginsManager.enabledPlugins.length > 0 + property int _minimumWidth: (showAgenda ? agendaViewWidth : units.largeSpacing) + monthViewWidth + property int _minimumHeight: PlasmaCore.Units.gridUnit * 12 + readonly property int agendaViewWidth: _minimumHeight readonly property int monthViewWidth: monthView.showWeekNumbers ? Math.round(_minimumHeight * 1.25) : Math.round(_minimumHeight * 1.125) diff --git a/Plasma/Plasma Widgets/User/Start Menu/SevenStart/contents/ui/MenuRepresentation.qml b/Plasma/Plasma Widgets/User/Start Menu/SevenStart/contents/ui/MenuRepresentation.qml index 8cbc2f5..6830ddf 100644 --- a/Plasma/Plasma Widgets/User/Start Menu/SevenStart/contents/ui/MenuRepresentation.qml +++ b/Plasma/Plasma Widgets/User/Start Menu/SevenStart/contents/ui/MenuRepresentation.qml @@ -38,6 +38,9 @@ import QtGraphicalEffects 1.0 import org.kde.kquickcontrolsaddons 2.0 import org.kde.plasma.private.quicklaunch 1.0 +import org.kde.kirigami 2.13 as Kirigami +import org.kde.kquickcontrolsaddons 2.0 as KQuickAddons + import QtQuick.Dialogs 1.2 @@ -717,7 +720,7 @@ PlasmaCore.Dialog { } PlasmaCore.IconItem { - id: imgAuthor + id: imgAuthorIcon anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right @@ -726,15 +729,32 @@ PlasmaCore.Dialog { anchors.leftMargin: 2 anchors.rightMargin: 2 anchors.bottomMargin: 2 - source: kuser.faceIconUrl.toString() || "user-identity" + source: "user-identity" smooth: true visible: false - usesPlasmaTheme: false + + } + + Image { + id: imgAuthor + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.topMargin: units.smallSpacing*2 + anchors.leftMargin: units.smallSpacing*2 + anchors.rightMargin: units.smallSpacing*2 + anchors.bottomMargin: units.smallSpacing*2 + source: kuser.faceIconUrl.toString() + smooth: true + mipmap: true + visible: false + } OpacityMask { anchors.fill: imgAuthor - source: imgAuthor + source: (kuser.faceIconUrl.toString() === "") ? imgAuthorIcon : imgAuthor; maskSource: Rectangle { width: imgAuthor.width height: imgAuthor.height