@@ -2,6 +2,7 @@ import QtQuick
22import QtQuick.Controls
33import QtQuick.Layouts
44import org.kde.kirigami as Kirigami
5+ import org.kde.plasma.core as PlasmaCore
56import org.kde.plasma.plasmoid
67import "../code/enum.js" as Enum
78import "../code/utils.js" as Utils
@@ -28,6 +29,13 @@ ColumnLayout {
2829
2930 property bool showFontConfig: elementName === " " || elementName === " widgets"
3031
32+ readonly property bool vertical: {
33+ if (Plasmoid .formFactor == PlasmaCore .Types .Vertical ) {
34+ return true ;
35+ }
36+ return false ;
37+ }
38+
3139 property var fontsModel: {
3240 let arr = [];
3341 const fonts = Qt .fontFamilies ();
@@ -250,9 +258,34 @@ ColumnLayout {
250258 }
251259 }
252260 Kirigami .ContextualHelpButton {
253- toolTipText: i18n (" Make the System Tray expand button be the same width as the other tray items" )
261+ toolTipText: i18n (" Make the System Tray expand button use the same size as the other tray items" )
262+ }
263+ visible: elementName === " trayWidgets"
264+ }
265+
266+ RowLayout {
267+ visible: root .elementName === " trayWidgets"
268+ Kirigami .FormData .label : root .vertical ? i18n (" Custom cell height:" ) : i18n (" Custom cell width:" )
269+ CheckBox {
270+ checked: root .config .trayWidgets .customCellSizeEnabled
271+ onCheckedChanged: {
272+ root .config .trayWidgets .customCellSizeEnabled = checked;
273+ root .updateConfig ();
274+ }
275+ }
276+
277+ SpinBox {
278+ id: trayCellSize
279+ from: 20
280+ to: 64
281+ stepSize: 2
282+ value: root .config .trayWidgets .customCellSize
283+ onValueModified: {
284+ root .config .trayWidgets .customCellSize = value;
285+ root .updateConfig ();
286+ }
287+ enabled: root .config .trayWidgets .customCellSizeEnabled
254288 }
255- visible: elementName === " trayWidgets" && root .elementState === Enum .WidgetStates .Normal
256289 }
257290
258291 CheckBox {
0 commit comments