diff options
author | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2016-03-15 13:17:31 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2016-03-23 11:54:36 +0000 |
commit | 13e6379aad532fc89a1beeef15c0d9de38e90f99 (patch) | |
tree | 5f6fd4485c00a05d5612322fa91400a8e5f765bb | |
parent | 68eec20b69851e5c0901a186ad27fe56abac1745 (diff) |
Update Default style Button to match new design specs
Change-Id: Id95e48ee694cb205bf2f16acbc90b1cb54e6d596
Task-number: QTBUG-50993
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
-rw-r--r-- | src/imports/controls/Button.qml | 11 |
1 files changed, 7 insertions, 4 deletions
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] } |