diff --git a/containment/package/contents/ui/abilities/Metrics.qml b/containment/package/contents/ui/abilities/Metrics.qml index 1394d272..c4fda9f3 100644 --- a/containment/package/contents/ui/abilities/Metrics.qml +++ b/containment/package/contents/ui/abilities/Metrics.qml @@ -1,61 +1,60 @@ /* * Copyright 2020 Michail Vourlakos * * This file is part of Latte-Dock * * Latte-Dock is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * Latte-Dock is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ import QtQuick 2.7 import org.kde.plasma.plasmoid 2.0 import org.kde.latte.abilities.containers 0.1 as ContainerAbility ContainerAbility.Metrics { id: mets property Item animations: null property Item autosize: null //! Signals signal iconSizeAnimationEnded(); //! Public Properties iconSize: autosizeEnabled && autosize.iconSize > 0 ? Math.min(autosize.iconSize, maxIconSize) : maxIconSize maxIconSize: portionIconSize!==-1 ? portionIconSize : plasmoid.configuration.iconSize - //! Private Properties readonly property int portionIconSize: { //icon size based on screen height if ((plasmoid.configuration.proportionIconSize===-1) || !latteView) return -1; return Math.max(16,Math.round(latteView.screenGeometry.height * plasmoid.configuration.proportionIconSize/100/8)*8); } readonly property bool autosizeEnabled: autosize !== undefined && autosize.isActive //! Behaviors Behavior on iconSize { enabled: !(root.editMode && root.behaveAsPlasmaPanel) NumberAnimation { duration: 0.8 * animations.duration.proposed onRunningChanged: { if (!running) { mets.iconSizeAnimationEnded(); } } } } } diff --git a/declarativeimports/abilities/definitions/metrics/Fraction.qml b/declarativeimports/abilities/definitions/metrics/Fraction.qml index bd2261ea..432ff816 100644 --- a/declarativeimports/abilities/definitions/metrics/Fraction.qml +++ b/declarativeimports/abilities/definitions/metrics/Fraction.qml @@ -1,26 +1,27 @@ /* * Copyright 2020 Michail Vourlakos * * This file is part of Latte-Dock * * Latte-Dock is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * Latte-Dock is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ import QtQuick 2.0 Item { property real thicknessMargin: 0.06 property real lengthMargin: 0.06 - property real lengthPadding: 8 + property real lengthPadding: 0.06 + property real lengthAppletPadding: 0.06 } diff --git a/declarativeimports/abilities/definitions/metrics/Padding.qml b/declarativeimports/abilities/definitions/metrics/Padding.qml index 114edf32..f9fd9c35 100644 --- a/declarativeimports/abilities/definitions/metrics/Padding.qml +++ b/declarativeimports/abilities/definitions/metrics/Padding.qml @@ -1,24 +1,25 @@ /* * Copyright 2020 Michail Vourlakos * * This file is part of Latte-Dock * * Latte-Dock is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * Latte-Dock is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ import QtQuick 2.0 Item { property int length: 4 + property int lengthApplet: 4 } diff --git a/declarativeimports/abilities/definitions/metrics/Totals.qml b/declarativeimports/abilities/definitions/metrics/Totals.qml index 34b0a6d5..ad5d4a99 100644 --- a/declarativeimports/abilities/definitions/metrics/Totals.qml +++ b/declarativeimports/abilities/definitions/metrics/Totals.qml @@ -1,26 +1,26 @@ /* * Copyright 2020 Michail Vourlakos * * This file is part of Latte-Dock * * Latte-Dock is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * Latte-Dock is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ import QtQuick 2.0 Item { - property int lengthSingleMargin: margin.length + padding.length - property int lengthBilateralMargins: 2 * lengthSingleMargin - property int thicknessBilateralMargins: 2 * margin.thickness + readonly property int lengthMargin: margin.length + padding.length + readonly property int lengthMargins: 2 * lengthMargin + readonly property int thicknessMargins: 2 * margin.thickness }