diff --git a/plasmoid/package/contents/ui/abilities/Metrics.qml b/plasmoid/package/contents/ui/abilities/Metrics.qml index c68730528..55e62de0a 100644 --- a/plasmoid/package/contents/ui/abilities/Metrics.qml +++ b/plasmoid/package/contents/ui/abilities/Metrics.qml @@ -25,14 +25,30 @@ import org.kde.latte.abilities.applets 0.1 as AppletAbility AppletAbility.Metrics { //! Public Local Properties - local.iconSize: Math.max(plasmoid.configuration.iconSize, 16) + local.iconSize: { + if (inPlasmaDesktop) { + return maxIconSizeInPlasma; + } + + return panelThickness - 2*margin.thickness; + } + local.backgroundThickness: totals.thickness local.margin.length: 0.1 * iconSize - local.margin.thickness: 0.16 * iconSize + local.margin.thickness: { + if (inPlasmaDesktop) { + return 0.16 * iconSize; + } + + return Math.max(2, (panelThickness - maxIconSizeInPlasma) / 2); + } local.margin.screenEdge: 0 local.padding.length: 0.04 * iconSize local.mask.thickness.normalForItems: totals.thickness local.mask.thickness.zoomedForItems: parabolic.factor.maxZoom * totals.thickness + + readonly property int maxIconSizeInPlasma: Math.max(plasmoid.configuration.iconSize, 16) + readonly property int panelThickness: (root.vertical ? root.width : root.height) } diff --git a/plasmoid/package/contents/ui/abilities/ParabolicEffect.qml b/plasmoid/package/contents/ui/abilities/ParabolicEffect.qml index e82c50a62..12350a4c1 100644 --- a/plasmoid/package/contents/ui/abilities/ParabolicEffect.qml +++ b/plasmoid/package/contents/ui/abilities/ParabolicEffect.qml @@ -26,8 +26,10 @@ import org.kde.latte.abilities.applets 0.1 as AppletAbility AppletAbility.ParabolicEffect { id: parabolic - local.factor.zoom: ( 1 + (plasmoid.configuration.zoomLevel / 20) ) - local.factor.maxZoom: Math.max(local.factor.zoom, 1.6) + + isEnabled: !root.inPlasma || root.inPlasmaDesktop + local.factor.zoom: isEnabled ? ( 1 + (plasmoid.configuration.zoomLevel / 20) ) : 1 + local.factor.maxZoom: isEnabled ? Math.max(local.factor.zoom, 1.6) : 1 readonly property bool horizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal diff --git a/plasmoid/package/contents/ui/config/ConfigAppearance.qml b/plasmoid/package/contents/ui/config/ConfigAppearance.qml index 2bedef6e9..7caa772b7 100644 --- a/plasmoid/package/contents/ui/config/ConfigAppearance.qml +++ b/plasmoid/package/contents/ui/config/ConfigAppearance.qml @@ -66,7 +66,7 @@ Item { RowLayout{ Label { - text: i18n("Icon size: ") + text: i18n("Maximum icon size: ") } ComboBox { diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index f16ec4a38..78d3eaabf 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -232,7 +232,12 @@ Item { //BEGIN Latte Dock Communicator property QtObject latteBridge: null - readonly property bool inPlasmaPanel: latteBridge === null + readonly property bool inPlasma: latteBridge === null + readonly property bool inPlasmaDesktop: inPlasma && !inPlasmaPanel + readonly property bool inPlasmaPanel: inPlasma && (plasmoid.location === PlasmaCore.Types.LeftEdge + || plasmoid.location === PlasmaCore.Types.RightEdge + || plasmoid.location === PlasmaCore.Types.BottomEdge + || plasmoid.location === PlasmaCore.Types.TopEdge) readonly property bool enforceLattePalette: latteBridge && latteBridge.applyPalette && latteBridge.palette readonly property bool latteInEditMode: latteBridge && latteBridge.inEditMode //END Latte Dock Communicator