File 2003-notifications-applet-ui.patch of Package plasma6-workspace
diff --git a/applets/notifications/package/contents/ui/FullRepresentation.qml b/applets/notifications/package/contents/ui/FullRepresentation.qml
index cb16e07f10e9e9f36ba66a99710a3e909b20e50c..16c9b932f50cb62f970a945b60c42827ad9471a7 100644
--- a/applets/notifications/package/contents/ui/FullRepresentation.qml
+++ b/applets/notifications/package/contents/ui/FullRepresentation.qml
@@ -5,6 +5,7 @@
*/
import QtQuick 2.10
+import QtQuick.Controls 2.15
import QtQuick.Layouts 1.1
import org.kde.plasma.plasmoid 2.0
@@ -359,19 +360,24 @@ PlasmaExtras.Representation {
Component {
id: groupDelegate
- NotificationHeader {
- applicationName: model.applicationName
- applicationIconSource: model.applicationIconName
- originName: model.originName || ""
+ Control {
+ topPadding: 0
+ bottomPadding: 0
- // don't show timestamp for group
+ contentItem: NotificationHeader {
+ applicationName: model.applicationName
+ applicationIconSource: model.applicationIconName
+ originName: model.originName || ""
- configurable: model.configurable
- closable: model.closable
- closeButtonTooltip: i18n("Close Group")
+ // don't show timestamp for group
- onCloseClicked: historyModel.close(historyModel.index(index, 0));
- onConfigureClicked: historyModel.configure(historyModel.index(index, 0))
+ configurable: model.configurable
+ closable: model.closable
+ closeButtonTooltip: i18n("Close Group")
+
+ onCloseClicked: historyModel.close(historyModel.index(index, 0));
+ onConfigureClicked: historyModel.configure(historyModel.index(index, 0))
+ }
}
}
@@ -380,30 +386,21 @@ PlasmaExtras.Representation {
ColumnLayout {
spacing: Kirigami.Units.smallSpacing
- RowLayout {
- Item {
- id: groupLineContainer
- Layout.fillHeight: true
- Layout.topMargin: Kirigami.Units.smallSpacing
- width: Kirigami.Units.iconSizes.small
- visible: model.isInGroup
-
- // Not using the Plasma theme's vertical line SVG because we want something thicker
- // than a hairline, and thickening a thin line SVG does not necessarily look good
- // with all Plasma themes.
- Rectangle {
- anchors.horizontalCenter: parent.horizontalCenter
- width: 3
- height: parent.height
- // TODO: use separator color here, once that color role is implemented
- color: Kirigami.Theme.textColor
- opacity: 0.2
+ Control {
+ Layout.fillWidth: true
+
+ background: Rectangle {
+ border.color: transparentize(Kirigami.Theme.textColor, Kirigami.Theme.frameContrast)
+ border.width: 1
+ color: transparentize(Kirigami.Theme.textColor, Kirigami.Theme.lightFrameContrast)
+ radius: Kirigami.Units.cornerRadius
+
+ function transparentize(color, alpha) {
+ return Qt.rgba(color.r, color.g, color.b, alpha);
}
}
- NotificationItem {
- Layout.fillWidth: true
-
+ contentItem: NotificationItem {
notificationType: model.type
inGroup: model.isInGroup
@@ -519,17 +516,6 @@ PlasmaExtras.Representation {
&& delegate.ListView.nextSection !== delegate.ListView.section
onClicked: list.setGroupExpanded(model.index, !model.isGroupExpanded)
}
-
- KSvg.SvgItem {
- Layout.fillWidth: true
- Layout.bottomMargin: Kirigami.Units.smallSpacing
- imagePath: "widgets/line"
- elementId: "horizontal-line"
-
- // property is only atached to the delegate itself (the Loader in our case)
- visible: (!model.isInGroup || delegate.ListView.nextSection !== delegate.ListView.section)
- && delegate.ListView.nextSection !== "" // don't show after last item
- }
}
}
}