@@ -32,6 +32,9 @@ ColumnLayout {
3232 // Hide the bar widget when there are no updates
3333 property bool hideOnEmpty: pluginApi .pluginSettings .hideOnEmpty ?? pluginApi .manifest .metadata .defaultSettings .hideOnEmpty
3434
35+ // Show close button in panel
36+ property bool closeButton: pluginApi .pluginSettings .closeButton ?? pluginApi .manifest .metadata .defaultSettings .closeButton
37+
3538 // Refresh after time intervals
3639 property bool refreshTimer: pluginApi .pluginSettings .refreshTimer ?? pluginApi .manifest .metadata .defaultSettings .refreshTimer
3740
@@ -189,6 +192,26 @@ ColumnLayout {
189192 }
190193 }
191194
195+ NDivider {
196+ Layout .fillWidth : true
197+ Layout .topMargin : Style .marginS
198+ Layout .bottomMargin : Style .marginS
199+ }
200+
201+ // Close Button Toggle
202+ Item {
203+ Layout .fillWidth : true
204+ Layout .preferredHeight : closeButtonToggle .implicitHeight
205+ NToggle {
206+ id: closeButtonToggle
207+ anchors .fill : parent
208+ label: pluginApi .tr (" settings.closeButton" )
209+ description: pluginApi .tr (" settings.closeButtonDesc" )
210+ checked: root .closeButton
211+ onToggled : checked => root .closeButton = checked
212+ }
213+ }
214+
192215 NDivider {
193216 Layout .fillWidth : true
194217 Layout .topMargin : Style .marginS
@@ -438,6 +461,7 @@ ColumnLayout {
438461 pluginApi .pluginSettings .toast = root .toast
439462 pluginApi .pluginSettings .desktopTip = root .desktopTip
440463 pluginApi .pluginSettings .hideOnEmpty = root .hideOnEmpty
464+ pluginApi .pluginSettings .closeButton = root .closeButton
441465 pluginApi .pluginSettings .refreshTimer = root .refreshTimer
442466
443467 pluginApi .pluginSettings .refreshInterval = root .refreshInterval
0 commit comments