From 13e6379aad532fc89a1beeef15c0d9de38e90f99 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 15 Mar 2016 13:17:31 +0100 Subject: Update Default style Button to match new design specs Change-Id: Id95e48ee694cb205bf2f16acbc90b1cb54e6d596 Task-number: QTBUG-50993 Reviewed-by: J-P Nurmi --- src/imports/controls/Button.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/imports/controls/Button.qml b/src/imports/controls/Button.qml index 67e9bffe..f7f5433c 100644 --- a/src/imports/controls/Button.qml +++ b/src/imports/controls/Button.qml @@ -55,7 +55,7 @@ T.Button { text: control.text font: control.font opacity: enabled || highlighted ? 1 : 0.3 - color: control.highlighted ? "#ffffff" : (control.pressed ? "#26282a" : "#353637") + color: control.checked || control.highlighted ? "#ffffff" : (control.activeFocus ? "#0066ff" : (control.pressed ? "#26282a" : "#353637")) horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter elide: Text.ElideRight @@ -66,9 +66,12 @@ T.Button { background: Rectangle { implicitWidth: 100 implicitHeight: 40 - opacity: enabled ? 1 : 0.3 - color: control.pressed ? (control.highlighted ? "#585a5c" : "#e4e4e4") : (control.highlighted ? "#353637" : "#f6f6f6") - border.color: control.pressed ? "#26282a" : "#353637" + opacity: enabled ? 1 : (control.checked ? 0.2 : 0.3) + color: control.checked || control.highlighted ? + (control.activeFocus ? (control.pressed ? "#599bff" : "#0066ff") : (control.pressed ? "#585a5c" : "#353637")) : + (control.activeFocus ? (control.pressed ? "#cce0ff" : "#f0f6ff") : (control.pressed ? "#d6d6d6" : "#f6f6f6")) + border.color: control.activeFocus ? "#0066ff" : (control.pressed ? "#26282a" : "#353637") + border.width: control.checked || control.highlighted ? 0 : (control.activeFocus ? 2 : 1) } //! [background] } -- cgit v1.2.3