diff --git a/applets/notifications/package/contents/ui/Notifications.qml b/applets/notifications/package/contents/ui/Notifications.qml --- 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,30 @@ 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 { + width: units.iconSizes.smallMedium + // Place horizontally aligned to the other close buttons. + // This takes a smallSpacing from the right, and a fourth of it due to + // the indentation on the left. + Layout.rightMargin: Math.round(units.smallSpacing + (units.smallSpacing / 4)) + height: width + iconSource: "edit-delete" + tooltip: i18n("Clear History") + onClicked: clearHistory() + } } // History stuff