From 796211bbd5b50363884cb87b00522b832827b0ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Tr=C3=B6scher?= Date: Thu, 28 Jun 2012 19:40:33 +0200 Subject: [PATCH] Plasma qml-Components ToolButton: change text-color on hover more fluently REVIEW: 105375 REVIEWED-BY: troscher aseigo --- declarativeimports/plasmacomponents/qml/ToolButton.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/declarativeimports/plasmacomponents/qml/ToolButton.qml b/declarativeimports/plasmacomponents/qml/ToolButton.qml index 165582187..80de4633f 100644 --- a/declarativeimports/plasmacomponents/qml/ToolButton.qml +++ b/declarativeimports/plasmacomponents/qml/ToolButton.qml @@ -211,7 +211,10 @@ Item { font.underline: theme.defaultFont.underline font.weight: theme.defaultFont.weight font.wordSpacing: theme.defaultFont.wordSpacing - color: surface.opacity == 1 ? theme.buttonTextColor : theme.textColor + + color: mouse.containsMouse ? theme.buttonTextColor : theme.textColor + Behavior on color { ColorAnimation { duration: 100 } } + horizontalAlignment: icon.valid ? Text.AlignLeft : Text.AlignHCenter verticalAlignment: Text.AlignVCenter }