Accepting request 597353 from KDE:Frameworks5

- Add patch to add a clear button to the notification history (kde#386068):
  * 0001-Add-a-button-to-clear-the-notification-history.patch

OBS-URL: https://build.opensuse.org/request/show/597353
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/plasma5-workspace?expand=0&rev=90
This commit is contained in:
Dominique Leuenberger 2018-04-19 13:20:20 +00:00 committed by Git OBS Bridge
commit 9b96306b97
3 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1,82 @@
From 08864d59109a869a906fb98059f4346a52ee0a6d Mon Sep 17 00:00:00 2001
From: "Christian (Fuchs) Loosli" <kde@fuchsnet.ch>
Date: Tue, 17 Apr 2018 10:18:31 +0200
Subject: [PATCH] Add a button to clear the notification history
Summary:
Adds a button in the plasmoid header to clear the history, same as the context menu.
The icon used is the same as clear history in the klipper plasmoid.
BUG: 386068
FIXED-IN: 5.13.0
Test Plan: Please test the alignment on your screen, whilst I made sure to use provided units, due to the indentation of heading I had to use fractions, which might lead to odd results on different resolutions / dpi
Reviewers: broulik
Reviewed By: broulik
Subscribers: abetts, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11261
---
.../package/contents/ui/Notifications.qml | 33 ++++++++++++++++++----
1 file changed, 28 insertions(+), 5 deletions(-)
diff --git a/applets/notifications/package/contents/ui/Notifications.qml b/applets/notifications/package/contents/ui/Notifications.qml
index b87e13da..1781185c 100644
--- a/applets/notifications/package/contents/ui/Notifications.qml
+++ b/applets/notifications/package/contents/ui/Notifications.qml
@@ -18,6 +18,7 @@
*/
import QtQuick 2.0
+import QtQuick.Layouts 1.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
@@ -265,12 +266,34 @@ Column {
delegate: NotificationDelegate { listModel: notificationsModel }
}
- PlasmaExtras.Heading {
- width: parent.width
- level: 3
- opacity: 0.6
+ RowLayout {
+ Layout.fillWidth: true
+ spacing: units.smallSpacing
visible: historyCount > 0
- text: i18n("History")
+ width: parent.width
+
+ PlasmaExtras.Heading {
+ Layout.fillWidth: true
+ level: 3
+ opacity: 0.6
+ text: i18n("History")
+ }
+
+ PlasmaComponents.ToolButton {
+ Layout.rightMargin: spacerSvgFrame.margins.right
+ iconSource: "edit-delete"
+ tooltip: i18n("Clear History")
+ onClicked: clearHistory()
+ }
+ }
+
+ // This hack is unfortunately needed to have the buttons align,
+ // the ones in the list contain have a margin due to a frame for being a list item.
+ PlasmaCore.FrameSvgItem {
+ id : spacerSvgFrame
+ imagePath: "widgets/listitem"
+ prefix: "normal"
+ visible: false
}
// History stuff
--
2.16.2

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Apr 17 08:19:26 UTC 2018 - fabian@ritter-vogt.de
- Add patch to add a clear button to the notification history (kde#386068):
* 0001-Add-a-button-to-clear-the-notification-history.patch
-------------------------------------------------------------------
Sat Mar 31 12:34:04 UTC 2018 - wbauer@tmo.at

View File

@ -41,6 +41,7 @@ Patch0: Fix-weather-engine-BBC-provider.patch
Patch201: 0001-Call-KLocalizedString-setApplicationDomain-after-Q-A.patch
Patch202: 0002-Add-platform-detection-to-KWorkspace-library-to-adju.patch
Patch203: 0003-No-longer-export-QT_QPA_PLATFORM-env-variable-to-the.patch
Patch204: 0001-Add-a-button-to-clear-the-notification-history.patch
# PATCHES 501-??? are PATCH-FIX-OPENSUSE
# PATCH-FIX-OPENSUSE 0001-Rename-qdbus-in-startkde.patch cgiboudeaux@gmx.com -- Rename the qdbus executable in startkde
Patch501: 0001-Rename-qdbus-in-startkde.patch