Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:epopov:branches:openSUSE:Factory
plasma6-workspace
2000-applets.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2000-applets.patch of Package plasma6-workspace
diff --git a/applets/batterymonitor/package/contents/ui/PopupDialog.qml b/applets/batterymonitor/package/contents/ui/PopupDialog.qml index 6891dcc9cdfe34a78431ecd60424bfed5d87d493..bd400bf850780540aab803f5a7c64809264fc951 100644 --- a/applets/batterymonitor/package/contents/ui/PopupDialog.qml +++ b/applets/batterymonitor/package/contents/ui/PopupDialog.qml @@ -24,15 +24,6 @@ PlasmaExtras.Representation { property string activeProfile property var profiles - // List of active power management inhibitions (applications that are - // blocking sleep and screen locking). - // - // type: [{ - // Icon: string, - // Name: string, - // Reason: string, - // }] - property var inhibitions: [] property bool manuallyInhibited property bool inhibitsLidAction @@ -41,33 +32,12 @@ PlasmaExtras.Representation { // type: [{ Name: string, Icon: string, Profile: string, Reason: string }] required property var profileHolds - signal powerManagementChanged(bool disabled) signal inhibitionChangeRequested(bool inhibit) signal activateProfileRequested(string profile) collapseMarginsHint: true - KeyNavigation.down: pmSwitch.pmCheckBox - - header: PlasmaExtras.PlasmoidHeading { - leftPadding: !mirrored ? Kirigami.Units.smallSpacing : 0 - rightPadding: mirrored ? Kirigami.Units.smallSpacing : 0 - - contentItem: PowerManagementItem { - id: pmSwitch - - inhibitions: dialog.inhibitions - manuallyInhibited: dialog.manuallyInhibited - inhibitsLidAction: dialog.inhibitsLidAction - pluggedIn: dialog.pluggedIn - - onInhibitionChangeRequested: inhibit => { - dialog.inhibitionChangeRequested(inhibit); - } - - onDisabledChanged: dialog.powerManagementChanged(disabled) - } - } + KeyNavigation.down: batteryList.children[0] contentItem: PlasmaComponents3.ScrollView { id: scrollView diff --git a/applets/batterymonitor/package/contents/ui/main.qml b/applets/batterymonitor/package/contents/ui/main.qml index 932615b2121e3c2931a7ce6c6cd400f1e3f4e4e2..c59c02524be2dbd9f869841ded39b2fb5a34c9f1 100644 --- a/applets/batterymonitor/package/contents/ui/main.qml +++ b/applets/batterymonitor/package/contents/ui/main.qml @@ -87,7 +87,14 @@ PlasmoidItem { || Plasmoid.location === PlasmaCore.Types.BottomEdge || Plasmoid.location === PlasmaCore.Types.LeftEdge) - property bool powermanagementDisabled: false + property bool powermanagementDisabled: { + for (let key in pmSource.data["Inhibitions"]) { + if (key === "plasmashell" || key === "plasmoidviewer") { + return true; + } + } + return false; + } // List of active power management inhibitions (applications that are // blocking sleep and screen locking). @@ -120,10 +127,6 @@ PlasmoidItem { LayoutMirroring.childrenInherit: true Plasmoid.status: { - if (powermanagementDisabled) { - return PlasmaCore.Types.ActiveStatus; - } - if (pmSource.data.Battery["Has Cumulative"] && pmSource.data["Battery"]["State"] === "Discharging") { return PlasmaCore.Types.ActiveStatus; } @@ -245,7 +248,6 @@ PlasmoidItem { pluggedIn: pmSource.data["AC Adapter"] !== undefined && pmSource.data["AC Adapter"]["Plugged in"] remainingTime: batterymonitor.remainingTime activeProfile: batterymonitor.actuallyActiveProfile - inhibitions: batterymonitor.inhibitions manuallyInhibited: batterymonitor.manuallyInhibited inhibitsLidAction: pmSource.data["PowerDevil"] && pmSource.data["PowerDevil"]["Is Lid Present"] && !pmSource.data["PowerDevil"]["Triggers Lid Action"] ? true : false profilesInstalled: pmSource.data["Power Profiles"] ? pmSource.data["Power Profiles"]["Installed"] : false @@ -254,30 +256,6 @@ PlasmoidItem { degradationReason: pmSource.data["Power Profiles"] ? (pmSource.data["Power Profiles"]["Performance Degraded Reason"] || "") : "" profileHolds: batterymonitor.activeProfileHolds - onInhibitionChangeRequested: inhibit => { - const service = pmSource.serviceForSource("PowerDevil"); - if (inhibit) { - const reason = i18n("The battery applet has enabled system-wide inhibition"); - const op1 = service.operationDescription("beginSuppressingSleep"); - op1.reason = reason; - const op2 = service.operationDescription("beginSuppressingScreenPowerManagement"); - op2.reason = reason; - - const job1 = service.startOperationCall(op1); - const job2 = service.startOperationCall(op2); - } else { - const op1 = service.operationDescription("stopSuppressingSleep"); - const op2 = service.operationDescription("stopSuppressingScreenPowerManagement"); - - const job1 = service.startOperationCall(op1); - const job2 = service.startOperationCall(op2); - } - Logic.updateInhibitions(batterymonitor, pmSource); - } - onPowerManagementChanged: disabled => { - batterymonitor.powermanagementDisabled = disabled - } - Notification { id: powerProfileError componentName: "plasma_workspace" @@ -307,6 +285,32 @@ PlasmoidItem { } Plasmoid.contextualActions: [ + PlasmaCore.Action { + text: i18n("Manually Block Sleep and Screen Locking") + icon.name: "exception" + priority: PlasmaCore.Action.HighPriority + checkable: true + checked: batterymonitor.powermanagementDisabled + onTriggered: checked => { + const service = pmSource.serviceForSource("PowerDevil"); + if (checked) { + const reason = i18n("The battery applet has enabled system-wide inhibition"); + const op1 = service.operationDescription("beginSuppressingSleep"); + op1.reason = reason; + const op2 = service.operationDescription("beginSuppressingScreenPowerManagement"); + op2.reason = reason; + service.startOperationCall(op1); + service.startOperationCall(op2); + } else { + service.startOperationCall(service.operationDescription("stopSuppressingSleep")); + service.startOperationCall(service.operationDescription("stopSuppressingScreenPowerManagement")); + } + Logic.updateInhibitions(batterymonitor, pmSource); + } + }, + PlasmaCore.Action { + isSeparator: true + }, PlasmaCore.Action { text: i18n("&Show Energy Information…") icon.name: "documentinfo" diff --git a/applets/brightness/package/contents/ui/NightColorItem.qml b/applets/brightness/package/contents/ui/NightColorItem.qml index 3c82218d1068876ea63d05d7b3543cb452cba79f..4e9d4abdb76955c973a05e4a067196839d232e04 100644 --- a/applets/brightness/package/contents/ui/NightColorItem.qml +++ b/applets/brightness/package/contents/ui/NightColorItem.qml @@ -48,8 +48,6 @@ PlasmaComponents3.ItemDelegate { } } - KeyNavigation.tab: inhibitionSwitch.visible ? inhibitionSwitch : kcmButton - ColumnLayout { Layout.fillWidth: true Layout.alignment: Qt.AlignTop @@ -95,7 +93,7 @@ PlasmaComponents3.ItemDelegate { return i18nc("Night light phase", "Night"); } } - + enabled: false } @@ -108,49 +106,16 @@ PlasmaComponents3.ItemDelegate { } } - RowLayout { - spacing: Kirigami.Units.smallSpacing - - PlasmaComponents3.Switch { - id: inhibitionSwitch - visible: monitor.enabled - checked: monitor.available && monitor.enabled && monitor.running && inhibitor.state !== NightColorInhibitor.Inhibited - - Layout.fillWidth: true - - KeyNavigation.up: root.KeyNavigation.up - KeyNavigation.tab: kcmButton - KeyNavigation.right: kcmButton - KeyNavigation.backtab: root - - Keys.onPressed: (event) => { - if (event.key == Qt.Key_Space || event.key == Qt.Key_Return || event.key == Qt.Key_Enter) { - toggle(); - } - } - onToggled: toggleInhibition() - } + PlasmaComponents3.ProgressBar { + id: currentTemperatureBar - PlasmaComponents3.Button { - id: kcmButton - visible: KConfig.KAuthorized.authorizeControlModule("kcm_nightcolor") - - icon.name: "configure" - text: monitor.enabled ? i18n("Configure…") : i18n("Enable and Configure…") - - Layout.alignment: Qt.AlignRight - - KeyNavigation.up: root.KeyNavigation.up - KeyNavigation.backtab: inhibitionSwitch.visible ? inhibitionSwitch : root - KeyNavigation.left: inhibitionSwitch + Layout.fillWidth: true + Layout.topMargin: Kirigami.Units.smallSpacing + Layout.bottomMargin: Kirigami.Units.smallSpacing - Keys.onPressed: (event) => { - if (event.key == Qt.Key_Space || event.key == Qt.Key_Return || event.key == Qt.Key_Enter) { - clicked(); - } - } - onClicked: KCMLauncher.openSystemSettings("kcm_nightcolor") - } + from: 1000 + to: 6500 + value: monitor.currentTemperature } RowLayout { @@ -198,22 +163,6 @@ PlasmaComponents3.ItemDelegate { } } - function toggleInhibition() { - if (!monitor.available) { - return; - } - switch (inhibitor.state) { - case NightColorInhibitor.Inhibiting: - case NightColorInhibitor.Inhibited: - inhibitor.uninhibit(); - break; - case NightColorInhibitor.Uninhibiting: - case NightColorInhibitor.Uninhibited: - inhibitor.inhibit(); - break; - } - } - NightColorInhibitor { id: inhibitor } diff --git a/applets/brightness/package/contents/ui/main.qml b/applets/brightness/package/contents/ui/main.qml index 15488c0fd7a94efe6176cd854b05cabaa25b8482..4e839e3484872df973f4f1ecb3ba411e5a99699d 100644 --- a/applets/brightness/package/contents/ui/main.qml +++ b/applets/brightness/package/contents/ui/main.qml @@ -252,12 +252,35 @@ PlasmoidItem { } // todo Plasmoid.contextualActions: [ + PlasmaCore.Action { + id: toggleNightLight + icon.name: "redshift-status-on" + priority: PlasmaCore.Action.HighPriority + text: i18nc("@action:inmenu", "Night Light") + visible: nightColorMonitor.enabled + checkable: true + checked: nightColorMonitor.available && nightColorMonitor.enabled && nightColorMonitor.running && nightColorInhibitor.state !== NightColorInhibitor.Inhibited + onTriggered: { + if (!nightColorMonitor.available) { + return; + } + switch (nightColorInhibitor.state) { + case NightColorInhibitor.Inhibiting: + case NightColorInhibitor.Inhibited: + nightColorInhibitor.uninhibit(); + break; + case NightColorInhibitor.Uninhibiting: + case NightColorInhibitor.Uninhibited: + nightColorInhibitor.inhibit(); + break; + } + } + }, PlasmaCore.Action { id: configureNightLight icon.name: "configure" text: i18nc("@action:inmenu", "Configure Night Light…") visible: KAuthorized.authorize("kcm_nightcolor") - priority: PlasmaCore.Action.LowPriority onTriggered: KCMLauncher.openSystemSettings("kcm_nightcolor") } ] diff --git a/applets/clipboard/contents/ui/TextItemDelegate.qml b/applets/clipboard/contents/ui/TextItemDelegate.qml index 2acab02ac0f241876fa8e25d83ca5e5e96a10418..77f86da803d11a10b9d874511d4db54251f54b13 100644 --- a/applets/clipboard/contents/ui/TextItemDelegate.qml +++ b/applets/clipboard/contents/ui/TextItemDelegate.qml @@ -15,27 +15,23 @@ PlasmaComponents3.Label { verticalAlignment: Text.AlignVCenter text: { - var highlightFontTag = "<font color='" + Kirigami.Theme.highlightColor + "'>%1</font>" - - var text = DisplayRole.slice(0, 100) - - // first escape any HTML characters to prevent privacy issues - text = text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") - - // color code leading or trailing whitespace - // the first regex is basically "trim" - text = text.replace(/^\s+|\s+$/gm, function(match) { - // then inside the trimmed characters ("match") we replace each one individually - match = match.replace(/ /g, "␣") // space - .replace(/\t/g, "⇥") // tab - .replace(/\n/g, "↵") // return - return highlightFontTag.arg(match) - }) - - // finally turn line breaks into HTML br tags - text = text.replace(/\r\n|\r|\n/g, "<br>") - - return text + const color = Kirigami.Theme.highlightColor; + + let text = DisplayRole.slice(0, 1000); + for (const [regex, str] of [[/&/g, `&`], [/</g, `<`], [/>/g, `>`]]) { + text = text.replace(regex, str); + } + text = text.replace(/^\s+|\s+$/gm, (match1) => { + for (const [regex, str] of [[/ +/g, `␣`], [/\t+/g, `⇥`], [/\n+/g, `↵`]]) { + match1 = match1.replace(regex, (match2) => { + return `<font color='${color}'>${str.repeat(match2.length)}</font>`; + }); + } + return match1; + }); + text = text.replace(/\r\n|\r|\n/g, `<br>`); + + return text; } elide: Text.ElideRight wrapMode: Text.WrapAtWordBoundaryOrAnywhere diff --git a/applets/clipboard/contents/ui/main.qml b/applets/clipboard/contents/ui/main.qml index a802455294d71a115c4a9decffe55660b65fa76e..19a3f63195a175536612a7bc44bb73e00ca10112 100644 --- a/applets/clipboard/contents/ui/main.qml +++ b/applets/clipboard/contents/ui/main.qml @@ -47,7 +47,7 @@ PlasmoidItem { // because only the active applet can hide itself if (main.hideOnWindowDeactivate) main.expanded = false; - Plasmoid.status = PlasmaCore.Types.HiddenStatus; + Plasmoid.status = PlasmaCore.Types.PassiveStatus; } else { Plasmoid.status = PlasmaCore.Types.ActiveStatus } diff --git a/applets/digital-clock/package/contents/ui/CalendarView.qml b/applets/digital-clock/package/contents/ui/CalendarView.qml index ab3e94192deb4d7605b7e407a4f998deeb3c46b7..e2b27738229672b176f76f3186419ec18321afe0 100644 --- a/applets/digital-clock/package/contents/ui/CalendarView.qml +++ b/applets/digital-clock/package/contents/ui/CalendarView.qml @@ -37,10 +37,10 @@ PlasmaExtras.Representation { Kirigami.Theme.colorSet: Kirigami.Theme.Window Kirigami.Theme.inherit: false - Layout.minimumWidth: (calendar.showAgenda || calendar.showClocks) ? Kirigami.Units.gridUnit * 45 : Kirigami.Units.gridUnit * 22 + Layout.minimumWidth: (calendar.showAgenda || calendar.showClocks) ? Kirigami.Units.gridUnit * 41 : Kirigami.Units.gridUnit * 20 Layout.maximumWidth: Kirigami.Units.gridUnit * 80 - Layout.minimumHeight: Kirigami.Units.gridUnit * 25 + Layout.minimumHeight: Kirigami.Units.gridUnit * 23 Layout.maximumHeight: Kirigami.Units.gridUnit * 40 collapseMarginsHint: true diff --git a/applets/notifications/package/contents/ui/FullRepresentation.qml b/applets/notifications/package/contents/ui/FullRepresentation.qml index f949dad46aadae3f78f2bf222608a8a90a48cd7b..d128bae9a2cca3af0af9b334d2858e5d7121431a 100644 --- a/applets/notifications/package/contents/ui/FullRepresentation.qml +++ b/applets/notifications/package/contents/ui/FullRepresentation.qml @@ -22,9 +22,6 @@ import org.kde.plasma.private.notifications as Notifications import "global" PlasmaExtras.Representation { - // TODO these should be configurable in the future - readonly property int dndMorningHour: 6 - readonly property int dndEveningHour: 20 readonly property var appletInterface: root Layout.minimumWidth: Kirigami.Units.gridUnit * 12 @@ -38,8 +35,6 @@ PlasmaExtras.Representation { collapseMarginsHint: true - Keys.onDownPressed: dndCheck.forceActiveFocus(Qt.TabFocusReason); - Connections { target: root function onExpandedChanged() { @@ -51,182 +46,25 @@ PlasmaExtras.Representation { } header: PlasmaExtras.PlasmoidHeading { - ColumnLayout { - anchors { - fill: parent - leftMargin: Kirigami.Units.smallSpacing - } - id: header - spacing: 0 - - RowLayout { - Layout.fillWidth: true - spacing: 0 - - PlasmaComponents3.Switch { - id: dndCheck - enabled: NotificationManager.Server.valid - text: i18n("Do not disturb") - icon.name: "notifications-disabled" - checkable: true - checked: Globals.inhibited - - KeyNavigation.down: list - KeyNavigation.tab: list - - // Let the menu open on press - onPressed: { - if (!Globals.inhibited) { - dndMenu.date = new Date(); - // shows ontop of CheckBox to hide the fact that it's unchecked - // until you actually select something :) - dndMenu.open(0, 0); - } - } - // but disable only on click - onClicked: { - if (Globals.inhibited) { - Globals.revokeInhibitions(); - } - } - - - PlasmaExtras.ModelContextMenu { - id: dndMenu - property date date - visualParent: dndCheck - - onClicked: { - notificationSettings.notificationsInhibitedUntil = model.date; - notificationSettings.save(); - } - - model: { - var model = []; - - // For 1 hour - var d = dndMenu.date; - d.setHours(d.getHours() + 1); - d.setSeconds(0); - model.push({date: d, text: i18n("For 1 hour")}); - - d = dndMenu.date; - d.setHours(d.getHours() + 4); - d.setSeconds(0); - model.push({date: d, text: i18n("For 4 hours")}); - - // Until this evening - if (dndMenu.date.getHours() < dndEveningHour) { - d = dndMenu.date; - // TODO make the user's preferred time schedule configurable - d.setHours(dndEveningHour); - d.setMinutes(0); - d.setSeconds(0); - model.push({date: d, text: i18n("Until this evening")}); - } - - // Until next morning - if (dndMenu.date.getHours() > dndMorningHour) { - d = dndMenu.date; - d.setDate(d.getDate() + 1); - d.setHours(dndMorningHour); - d.setMinutes(0); - d.setSeconds(0); - model.push({date: d, text: i18n("Until tomorrow morning")}); - } - - // Until Monday - // show Friday and Saturday, Sunday is "0" but for that you can use "until tomorrow morning" - if (dndMenu.date.getDay() >= 5) { - d = dndMenu.date; - d.setHours(dndMorningHour); - // wraps around if necessary - d.setDate(d.getDate() + (7 - d.getDay() + 1)); - d.setMinutes(0); - d.setSeconds(0); - model.push({date: d, text: i18n("Until Monday")}); - } - - // Until "turned off" - d = dndMenu.date; - // Just set it to one year in the future so we don't need yet another "do not disturb enabled" property - d.setFullYear(d.getFullYear() + 1); - model.push({date: d, text: i18n("Until manually disabled")}); - - return model; - } - } - } - - Item { - Layout.fillWidth: true - } - - PlasmaComponents3.ToolButton { - visible: !(Plasmoid.containmentDisplayHints & PlasmaCore.Types.ContainmentDrawsPlasmoidHeading) + visible: !(plasmoid.containmentDisplayHints & PlasmaCore.Types.ContainmentDrawsPlasmoidHeading) - Accessible.name: root.clearHistoryAction.text - icon.name: "edit-clear-history" - enabled: root.clearHistoryAction.visible - onClicked: root.clearHistoryAction.trigger() + RowLayout { + anchors.fill: parent + anchors.leftMargin: Kirigami.Units.smallSpacing - PlasmaComponents3.ToolTip { - text: parent.Accessible.name - } - } - } - - PlasmaExtras.DescriptiveLabel { - Layout.leftMargin: dndCheck.mirrored ? 0 : dndCheck.indicator.width + 2 * dndCheck.spacing + Kirigami.Units.iconSizes.smallMedium - Layout.rightMargin: dndCheck.mirrored ? dndCheck.indicator.width + 2 * dndCheck.spacing + Kirigami.Units.iconSizes.smallMedium : 0 + Item { Layout.fillWidth: true - wrapMode: Text.WordWrap - textFormat: Text.PlainText - text: { - if (!Globals.inhibited) { - return ""; - } - - var inhibitedUntil = notificationSettings.notificationsInhibitedUntil; - var inhibitedUntilTime = inhibitedUntil.getTime(); - var inhibitedByApp = notificationSettings.notificationsInhibitedByApplication; - var inhibitedByMirroredScreens = notificationSettings.inhibitNotificationsWhenScreensMirrored - && notificationSettings.screensMirrored; - var dateNow = Date.now(); - - var sections = []; - - // Show until time if valid but not if too far int he future - if (!isNaN(inhibitedUntilTime) && inhibitedUntilTime - dateNow > 0 && - inhibitedUntilTime - dateNow < 100 * 24 * 60 * 60 * 1000 /* 1 year*/) { - const endTime = KCoreAddons.Format.formatRelativeDateTime(inhibitedUntil, Locale.ShortFormat); - const lowercaseEndTime = endTime[0] + endTime.slice(1); - sections.push(i18nc("Do not disturb until date", "Automatically ends: %1", lowercaseEndTime)); - } - - if (inhibitedByApp) { - var inhibitionAppNames = notificationSettings.notificationInhibitionApplications; - var inhibitionAppReasons = notificationSettings.notificationInhibitionReasons; - - for (var i = 0, length = inhibitionAppNames.length; i < length; ++i) { - var name = inhibitionAppNames[i]; - var reason = inhibitionAppReasons[i]; - - if (reason) { - sections.push(i18nc("Do not disturb until app has finished (reason)", "While %1 is active (%2)", name, reason)); - } else { - sections.push(i18nc("Do not disturb until app has finished", "While %1 is active", name)); - } - } - } + } - if (inhibitedByMirroredScreens) { - sections.push(i18nc("Do not disturb because external mirrored screens connected", "Screens are mirrored")) - } + PlasmaComponents3.ToolButton { + Accessible.name: root.clearHistoryAction.text + icon.name: "edit-clear-history" + enabled: root.clearHistoryAction.visible + onClicked: root.clearHistoryAction.trigger() - return sections.join(" · "); + PlasmaComponents3.ToolTip { + text: parent.Accessible.name } - visible: text !== "" } } } @@ -255,8 +93,6 @@ PlasmaExtras.Representation { readonly property alias wheelForwarder: wheelForwarder - KeyNavigation.up: dndCheck - Keys.onDeletePressed: { var idx = historyModel.index(currentIndex, 0); if (historyModel.data(idx, NotificationManager.Notifications.ClosableRole)) { diff --git a/applets/notifications/package/contents/ui/JobItem.qml b/applets/notifications/package/contents/ui/JobItem.qml index 6a8bc068d553a96cba4ad9d14acae50abc81fa45..b21a0158f657360112ce82d0d4991cac402f5418 100644 --- a/applets/notifications/package/contents/ui/JobItem.qml +++ b/applets/notifications/package/contents/ui/JobItem.qml @@ -165,40 +165,36 @@ ColumnLayout { Layout.leftMargin: Kirigami.Units.smallSpacing } - RowLayout { - spacing: 0 + PlasmaComponents3.ToolButton { + id: suspendButton + icon.name: "media-playback-pause" + onClicked: jobItem.jobState === NotificationManager.Notifications.JobStateSuspended ? jobItem.resumeJobClicked() + : jobItem.suspendJobClicked() - PlasmaComponents3.ToolButton { - id: suspendButton - icon.name: "media-playback-pause" - onClicked: jobItem.jobState === NotificationManager.Notifications.JobStateSuspended ? jobItem.resumeJobClicked() - : jobItem.suspendJobClicked() - - PlasmaComponents3.ToolTip { - text: i18ndc("plasma_applet_org.kde.plasma.notifications", "Pause running job", "Pause") - } + PlasmaComponents3.ToolTip { + text: i18ndc("plasma_applet_org.kde.plasma.notifications", "Pause running job", "Pause") } + } - PlasmaComponents3.ToolButton { - id: killButton - icon.name: "media-playback-stop" - onClicked: jobItem.killJobClicked() + PlasmaComponents3.ToolButton { + id: killButton + icon.name: "media-playback-stop" + onClicked: jobItem.killJobClicked() - PlasmaComponents3.ToolTip { - text: i18ndc("plasma_applet_org.kde.plasma.notifications", "Cancel running job", "Cancel") - } + PlasmaComponents3.ToolTip { + text: i18ndc("plasma_applet_org.kde.plasma.notifications", "Cancel running job", "Cancel") } + } - PlasmaComponents3.ToolButton { - id: expandButton - icon.name: checked ? "arrow-down" : (LayoutMirroring.enabled ? "arrow-left" : "arrow-right") - checkable: true - enabled: jobItem.jobDetails && jobItem.jobDetails.hasDetails + PlasmaComponents3.ToolButton { + id: expandButton + icon.name: checked ? "arrow-down" : (LayoutMirroring.enabled ? "arrow-left" : "arrow-right") + checkable: true + enabled: jobItem.jobDetails && jobItem.jobDetails.hasDetails - PlasmaComponents3.ToolTip { - text: expandButton.checked ? i18ndc("plasma_applet_org.kde.plasma.notifications", "A button tooltip; hides item details", "Hide Details") - : i18ndc("plasma_applet_org.kde.plasma.notifications", "A button tooltip; expands the item to show details", "Show Details") - } + PlasmaComponents3.ToolTip { + text: expandButton.checked ? i18ndc("plasma_applet_org.kde.plasma.notifications", "A button tooltip; hides item details", "Hide Details") + : i18ndc("plasma_applet_org.kde.plasma.notifications", "A button tooltip; expands the item to show details", "Show Details") } } } diff --git a/applets/notifications/package/contents/ui/main.qml b/applets/notifications/package/contents/ui/main.qml index a5214d1cb0402fe3c36c6cca39c169452aad89d0..efd51362fffc495848980015831df539179d9004 100644 --- a/applets/notifications/package/contents/ui/main.qml +++ b/applets/notifications/package/contents/ui/main.qml @@ -231,14 +231,27 @@ PlasmoidItem { visible: historyModel.expiredNotificationsCount > 0 onTriggered: { historyModel.clear(NotificationManager.Notifications.ClearExpired); - // clear is async, - historyModel.countChanged.connect(closeWhenCleared) } - function closeWhenCleared() { - if (historyModel.count === 0) { - closePlasmoid(); + }, + PlasmaCore.Action { + isSeparator: true + visible: clearHistory.visible + }, + PlasmaCore.Action { + id: doNotDisturb + text: i18n("Do Not Disturb") + icon.name: "notifications-disabled" + priority: PlasmaCore.Action.HighPriority + checkable: true + checked: Globals.inhibited + onTriggered: (checked) => { + // historyModel.clear(NotificationManager.Notifications.ClearExpired); + if (checked) { + notificationSettings.notificationsInhibitedUntil = new Date(8640000000000000); + notificationSettings.save(); + } else { + Globals.revokeInhibitions(); } - historyModel.countChanged.disconnect(closeWhenCleared) } } ] diff --git a/components/calendar/qml/DayDelegate.qml b/components/calendar/qml/DayDelegate.qml index c99b9ecfa9e2281f080c2fcb571d8a716320893a..910506e76c91c2e9897b88239a2daddba256a5fe 100644 --- a/components/calendar/qml/DayDelegate.qml +++ b/components/calendar/qml/DayDelegate.qml @@ -124,13 +124,11 @@ PlasmaComponents3.AbstractButton { sourceComponent: Row { spacing: Kirigami.Units.smallSpacing - property bool hasSubDayLabel: false - Repeater { model: DelegateModel { model: dayStyle.dayModel delegate: Rectangle { - width: hasSubDayLabel ? Kirigami.Units.mediumSpacing : Kirigami.Units.smallSpacing + width: Kirigami.Units.smallSpacing height: width radius: width / 2 color: model.eventColor ? Kirigami.ColorUtils.linearInterpolation(model.eventColor, Kirigami.Theme.textColor, 0.2) : Kirigami.Theme.highlightColor @@ -140,8 +138,6 @@ PlasmaComponents3.AbstractButton { } } } - - onLoaded: item.hasSubDayLabel = Qt.binding(() => subDayLabel.active) } contentItem: Item {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor