From e23d4b68f3f3b1467f032e4ce3501dab0feb5fee Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Fri, 17 May 2019 16:51:12 +0300 Subject: Material: account for accent color in flat highlighted button's ripple According to https://material.io/design/components/buttons.html#text-button Change-Id: Ia36a676864a8f738d204cf8db9430b797f1f2f99 Reviewed-by: Mitch Curtis --- src/imports/controls/material/Button.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/imports/controls') diff --git a/src/imports/controls/material/Button.qml b/src/imports/controls/material/Button.qml index 6f7d6c70..04c6664c 100644 --- a/src/imports/controls/material/Button.qml +++ b/src/imports/controls/material/Button.qml @@ -78,7 +78,6 @@ T.Button { control.highlighted ? control.Material.primaryHighlightedTextColor : control.Material.foreground } - // TODO: Add a proper ripple/ink effect for mouse/touch input and focus state background: Rectangle { implicitWidth: 64 implicitHeight: control.Material.buttonHeight @@ -113,7 +112,7 @@ T.Button { pressed: control.pressed anchor: control active: control.down || control.visualFocus || control.hovered - color: control.Material.rippleColor + color: control.flat && control.highlighted ? control.Material.highlightedRippleColor : control.Material.rippleColor } } } -- cgit v1.2.3