@@ -50,6 +50,7 @@ PlasmoidItem {
50
50
property string icon: Qt .resolvedUrl (" ../icons/" + iconName + " .svg" ).toString ().replace (" file://" , " " )
51
51
property bool hideWidget: plasmoid .configuration .hideWidget
52
52
property bool fixedSidePaddingEnabled: isEnabled && panelSettings .padding .enabled
53
+ property bool floatingDialogs: panelSettings .floatingDialogs
53
54
property bool isEnabled: plasmoid .configuration .isEnabled
54
55
property bool nativePanelBackgroundEnabled: (isEnabled ? cfg .nativePanelBackground .enabled : true ) || doPanelClickFix
55
56
property real nativePanelBackgroundOpacity: isEnabled ? cfg .nativePanelBackground .opacity : 1.0
@@ -1189,9 +1190,30 @@ PlasmoidItem {
1189
1190
Utils .panelOpacity (panelElement, isEnabled, nativePanelBackgroundOpacity)
1190
1191
}
1191
1192
1193
+ onFloatingDialogsChanged: {
1194
+ setFloatigApplets ()
1195
+ }
1196
+
1197
+ // inspired by https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1912
1198
+ function setFloatigApplets () {
1199
+ if (floatingDialogs) {
1200
+ containmentItem .Plasmoid .containmentDisplayHints |= PlasmaCore .Types .ContainmentPrefersFloatingApplets
1201
+ } else {
1202
+ containmentItem .Plasmoid .containmentDisplayHints &= ~ PlasmaCore .Types .ContainmentPrefersFloatingApplets
1203
+ }
1204
+ }
1205
+
1206
+ Connections {
1207
+ target: containmentItem .Plasmoid
1208
+ onContainmentDisplayHintsChanged: {
1209
+ setFloatigApplets ()
1210
+ }
1211
+ }
1212
+
1192
1213
onContainmentItemChanged: {
1193
1214
if (! containmentItem) return
1194
1215
Utils .toggleTransparency (containmentItem, nativePanelBackgroundEnabled)
1216
+ setFloatigApplets ()
1195
1217
}
1196
1218
1197
1219
// HACK: change panelLayout spacing on startup to trigger a length reload
0 commit comments