File tree 4 files changed +44
-1
lines changed
4 files changed +44
-1
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,10 @@ const baseStockPanelSettings = {
230
230
"thickness" : {
231
231
"enabled" : false ,
232
232
"value" : 48
233
+ } ,
234
+ "visible" : {
235
+ "enabled" : false ,
236
+ "value" : true
233
237
}
234
238
}
235
239
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ function dumpProps(obj) {
75
75
console . error ( obj ) ;
76
76
for ( var k of Object . keys ( obj ) ) {
77
77
const val = obj [ k ]
78
- if ( typeof val === 'function' ) continue
78
+ if ( k . endsWith ( "Changed" ) ) continue
79
79
if ( k === 'metaData' ) continue
80
80
console . log ( k + "=" + val + "\n" )
81
81
}
Original file line number Diff line number Diff line change @@ -324,6 +324,32 @@ KCM.SimpleKCM {
324
324
}
325
325
enabled: thicknessEnabled .checked
326
326
}
327
+
328
+ Kirigami .Separator {
329
+ Kirigami .FormData .isSection : true
330
+ Kirigami .FormData .label : i18n (" Show/Hide AKA Toggle panel" )
331
+ }
332
+
333
+ CheckBox {
334
+ Kirigami .FormData .label : i18n (" Enabled:" )
335
+ id: visibleEnabled
336
+ checked: config .visible .enabled
337
+ onCheckedChanged: {
338
+ config .visible .enabled = checked
339
+ updateConfig ()
340
+ }
341
+ }
342
+
343
+ CheckBox {
344
+ Kirigami .FormData .label : i18n (" Visible:" )
345
+ id: visible
346
+ checked: config .visible .value
347
+ onCheckedChanged: {
348
+ config .visible .value = checked
349
+ updateConfig ()
350
+ }
351
+ enabled: visibleEnabled .checked
352
+ }
327
353
}
328
354
}
329
355
}
Original file line number Diff line number Diff line change @@ -147,11 +147,17 @@ PlasmoidItem {
147
147
signal updateMasks ()
148
148
149
149
property var switchPresets: JSON .parse (plasmoid .configuration .switchPresets )
150
+ property QtObject panelView: null
150
151
151
152
onStockPanelSettingsChanged: {
152
153
Qt .callLater (function () {
153
154
// console.error(JSON.stringify(stockPanelSettings))
154
155
let script = Utils .setPanelModeScript (panelPosition, stockPanelSettings)
156
+ if (stockPanelSettings .visible .enabled ) {
157
+ panelView .visible = stockPanelSettings .visible .value
158
+ } else {
159
+ panelView .visible = true
160
+ }
155
161
Utils .evaluateScript (script)
156
162
})
157
163
}
@@ -1285,6 +1291,13 @@ PlasmoidItem {
1285
1291
}
1286
1292
}
1287
1293
1294
+ // https://github.com/olib14/pinpanel/blob/2d126f0f3ac3e35a725f05b0060a3dd5c924cbe7/package/contents/ui/main.qml#L58 ♥
1295
+ Item {
1296
+ onWindowChanged : (window ) => {
1297
+ main .panelView = window
1298
+ }
1299
+ }
1300
+
1288
1301
Connections {
1289
1302
target: plasmoid .configuration
1290
1303
onValueChanged: {
You can’t perform that action at this time.
0 commit comments