[plasma/plasma-desktop] /: Add a setting to keep normal notifications always on top

Oleksandr Popel null at kde.org
Fri Apr 30 19:29:46 BST 2021


Git commit 7021a1bc7cc8e60ad73e87794ae7301d8e30e35f by Oleksandr Popel.
Committed on 30/04/2021 at 16:05.
Pushed by ngraham into branch 'master'.

Add a setting to keep normal notifications always on top

M  +5    -0    doc/kcontrol/notifications/index.docbook
M  +17   -0    kcms/notifications/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/7021a1bc7cc8e60ad73e87794ae7301d8e30e35f

diff --git a/doc/kcontrol/notifications/index.docbook b/doc/kcontrol/notifications/index.docbook
index cb32e5cb6..b533dd932 100644
--- a/doc/kcontrol/notifications/index.docbook
+++ b/doc/kcontrol/notifications/index.docbook
@@ -81,6 +81,11 @@ each event.</para>
     <listitem><para>Keep critical notifications, such as your battery is almost empty, always on top. This ensures they will also be visible while watching a fullscreen video or giving a presentation.</para></listitem>
     </varlistentry>
 
+    <varlistentry>
+    <term>Normal notifications: <guiicon>Always keep on top</guiicon></term>
+    <listitem><para>Keep normal notifications, such as messages, always on top. This ensures they will also be visible while watching a fullscreen video or giving a presentation.</para></listitem>
+    </varlistentry>
+
     <varlistentry>
     <term>Low priority notifications: <guiicon>Show popup</guiicon> and <guiicon>Show in history</guiicon></term>
     <listitem><para>Whether low priority notifications, such as track changes in your media player, will be shown as popups or in the history, respectively.</para></listitem>
diff --git a/kcms/notifications/package/contents/ui/main.qml b/kcms/notifications/package/contents/ui/main.qml
index 2c2542f40..a2eb2ce5f 100644
--- a/kcms/notifications/package/contents/ui/main.qml
+++ b/kcms/notifications/package/contents/ui/main.qml
@@ -148,6 +148,23 @@ KCM.SimpleKCM {
             Kirigami.FormData.isSection: true
         }
 
+        QtControls.CheckBox {
+            Kirigami.FormData.label: i18n("Normal notifications:")
+            text: i18n("Always keep on top")
+            checked: kcm.notificationSettings.normalAlwaysOnTop
+            onClicked: kcm.notificationSettings.normalAlwaysOnTop = checked
+
+            KCM.SettingStateBinding {
+                configObject: kcm.notificationSettings
+                settingName: "NormalAlwaysOnTop"
+                extraEnabledConditions: root.notificationsAvailable
+            }
+        }
+
+        Item {
+            Kirigami.FormData.isSection: true
+        }
+
         QtControls.CheckBox {
             Kirigami.FormData.label: i18n("Low priority notifications:")
             text: i18n("Show popup")


More information about the kde-doc-english mailing list