diff options
author | Papoteur <yves.brungard_mageia@gadz.org> | 2022-08-31 20:15:37 +0200 |
---|---|---|
committer | Papoteur <yves.brungard_mageia@gadz.org> | 2022-08-31 20:15:37 +0200 |
commit | c3bb39f229423114f81d79b76a07a9115ca65b03 (patch) | |
tree | b8bb135a9a0997acb7ee694f619ba857432565d7 /components/ActionButton.qml | |
parent | 166238c8b718e7ceb4c1647adad35755465ffeed (diff) | |
download | mageia-sddm-c3bb39f229423114f81d79b76a07a9115ca65b03.tar mageia-sddm-c3bb39f229423114f81d79b76a07a9115ca65b03.tar.gz mageia-sddm-c3bb39f229423114f81d79b76a07a9115ca65b03.tar.bz2 mageia-sddm-c3bb39f229423114f81d79b76a07a9115ca65b03.tar.xz mageia-sddm-c3bb39f229423114f81d79b76a07a9115ca65b03.zip |
Diffstat (limited to 'components/ActionButton.qml')
-rw-r--r-- | components/ActionButton.qml | 59 |
1 files changed, 23 insertions, 36 deletions
diff --git a/components/ActionButton.qml b/components/ActionButton.qml index 342e0f9..af278f6 100644 --- a/components/ActionButton.qml +++ b/components/ActionButton.qml @@ -1,21 +1,8 @@ /* - * Copyright 2016 David Edmundson <davidedmundson@kde.org> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 or - * (at your option) any later version. - * - * This program 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 Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ + SPDX-FileCopyrightText: 2016 David Edmundson <davidedmundson@kde.org> + + SPDX-License-Identifier: LGPL-2.0-or-later +*/ import QtQuick 2.8 import org.kde.plasma.core 2.0 as PlasmaCore @@ -36,32 +23,32 @@ Item { activeFocusOnTab: true - property int iconSize: units.gridUnit * 3 + property int iconSize: PlasmaCore.Units.gridUnit * 3 - implicitWidth: Math.max(iconSize + units.largeSpacing * 2, label.contentWidth) - implicitHeight: iconSize + units.smallSpacing + label.implicitHeight + implicitWidth: Math.max(iconSize + PlasmaCore.Units.largeSpacing * 2, label.contentWidth) + implicitHeight: iconSize + PlasmaCore.Units.smallSpacing + label.implicitHeight opacity: activeFocus || containsMouse ? 1 : 0.85 - Behavior on opacity { - PropertyAnimation { // OpacityAnimator makes it turn black at random intervals - duration: units.longDuration - easing.type: Easing.InOutQuad - } + Behavior on opacity { + PropertyAnimation { // OpacityAnimator makes it turn black at random intervals + duration: PlasmaCore.Units.longDuration + easing.type: Easing.InOutQuad + } } Rectangle { id: iconCircle anchors.centerIn: icon - width: iconSize + units.smallSpacing + width: iconSize + PlasmaCore.Units.smallSpacing height: width radius: width / 2 color: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : PlasmaCore.ColorScope.textColor - opacity: activeFocus || containsMouse ? (softwareRendering ? 0.8 : 0.15) : (softwareRendering ? 0.6 : 0) + opacity: root.activeFocus || containsMouse ? (softwareRendering ? 0.8 : 0.15) : (softwareRendering ? 0.6 : 0) Behavior on opacity { - PropertyAnimation { // OpacityAnimator makes it turn black at random intervals - duration: units.longDuration - easing.type: Easing.InOutQuad - } + PropertyAnimation { // OpacityAnimator makes it turn black at random intervals + duration: PlasmaCore.Units.longDuration + easing.type: Easing.InOutQuad + } } } @@ -74,10 +61,10 @@ Item { color: PlasmaCore.ColorScope.textColor opacity: 0.15 Behavior on scale { - PropertyAnimation { - duration: units.shortDuration - easing.type: Easing.InOutQuart - } + PropertyAnimation { + duration: PlasmaCore.Units.shortDuration + easing.type: Easing.InOutQuart + } } } @@ -99,7 +86,7 @@ Item { font.pointSize: root.fontSize anchors { top: icon.bottom - topMargin: (softwareRendering ? 1.5 : 1) * units.smallSpacing + topMargin: (softwareRendering ? 1.5 : 1) * PlasmaCore.Units.smallSpacing left: parent.left right: parent.right } |