diff --git a/lookandfeel/contents/components/ActionButton.qml b/lookandfeel/contents/components/ActionButton.qml --- a/lookandfeel/contents/components/ActionButton.qml +++ b/lookandfeel/contents/components/ActionButton.qml @@ -27,6 +27,8 @@ property alias iconSource: icon.source property alias containsMouse: mouseArea.containsMouse property alias font: label.font + property alias circleOpacity: iconCircle.opacity + property alias labelAnchors: label.anchors signal clicked activeFocusOnTab: true @@ -36,6 +38,30 @@ implicitWidth: Math.max(iconSize + units.largeSpacing * 2, label.contentWidth) implicitHeight: iconSize + units.smallSpacing + label.implicitHeight + opacity: activeFocus || containsMouse ? 1 : 0.85 + Behavior on opacity { + OpacityAnimator { + duration: units.longDuration * 2 + easing.type: Easing.InOutQuad + } + } + + Rectangle { + id: iconCircle + anchors.centerIn: icon + width: iconSize + units.smallSpacing + height: width + radius: width + color: PlasmaCore.ColorScope.textColor + opacity: activeFocus || containsMouse ? 0.15 : 0 + Behavior on opacity { + OpacityAnimator { + duration: units.longDuration * 3 + easing.type: Easing.InOutQuad + } + } + } + PlasmaCore.IconItem { id: icon anchors { @@ -48,7 +74,7 @@ colorGroup: PlasmaCore.ColorScope.colorGroup active: mouseArea.containsMouse || root.activeFocus } - + PlasmaComponents.Label { id: label font.pointSize: 11 diff --git a/lookandfeel/contents/logout/LogoutButton.qml b/lookandfeel/contents/logout/LogoutButton.qml --- a/lookandfeel/contents/logout/LogoutButton.qml +++ b/lookandfeel/contents/logout/LogoutButton.qml @@ -30,6 +30,8 @@ onClicked: action() Layout.alignment: Qt.AlignTop iconSize: units.iconSizes.huge + circleOpacity: 0.15 // circles are always visible + labelAnchors.topMargin : units.smallSpacing * 1.5 // adjust for circleBackground opacity: activeFocus || containsMouse ? 1 : 0.5 font.underline: false Behavior on opacity {