diff --git a/containment/contents/ui/main.qml b/containment/contents/ui/main.qml index efd45ff94..1795885e7 100644 --- a/containment/contents/ui/main.qml +++ b/containment/contents/ui/main.qml @@ -92,7 +92,14 @@ DragDrop.DropArea { property int panelMargin: 0 property int panelShadow: 0 //shadowsSize property int editShadow: Math.ceil(iconSize / 5) - property int themePanelSize: plasmoid.configuration.panelSize + property int themePanelSize: { + //root.statesLineSize + root.iconSize + root.iconMargin + 1 + var panelBase = root.statesLineSize + root.panelMargin; + var iconMarginUsed = latteApplet ? root.iconMargin : 0; + var maxPanelSize = (root.statesLineSize + root.iconSize + iconMarginUsed + 1) - panelBase; + var percentage = plasmoid.configuration.panelSize/100; + return Math.max(panelBase, panelBase + percentage*maxPanelSize); + } property int iconMargin: Math.ceil(0.12 * iconSize) property int statesLineSize: latteApplet ? Math.ceil( root.iconSize/13 ) : 0 diff --git a/shell/contents/configuration/AppearanceConfig.qml b/shell/contents/configuration/AppearanceConfig.qml index 292ca2748..e18018c2e 100644 --- a/shell/contents/configuration/AppearanceConfig.qml +++ b/shell/contents/configuration/AppearanceConfig.qml @@ -250,8 +250,8 @@ PlasmaComponents.Page { value: plasmoid.configuration.panelSize minimumValue: 0 - maximumValue: Number(1.2 * plasmoid.configuration.iconSize).toFixed(0) //0.12*iconSize is the iconMargin, 0.08 for statesLine - stepSize: 2 + maximumValue: 100 + stepSize: 5 function updatePanelSize() { if (!pressed) @@ -259,7 +259,7 @@ PlasmaComponents.Page { } onPressedChanged: { - updatePanelSize() + updatePanelSize(); } Component.onCompleted: { @@ -269,7 +269,7 @@ PlasmaComponents.Page { PlasmaComponents.Label { enabled: showBackground.checked - text: panelSizeSlider.value + " px." + text: panelSizeSlider.value + " %" horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 }