Skip to content

Commit 7cd989d

Browse files
committed
Merge #238: Add OutlineButton interaction color animation states
f0cdf11 qml: Add OutlineButton interaction color animation states (jarolrod) 5ee9c25 qml: Address silent conflict with Header control in initerrormessage (jarolrod) Pull request description: Introduces the missing OutlineButton interaction color animation states as detailed in #237 | Default | Hovered | Pressed | | ------- | ------- | ------- | | <img width="612" alt="Screen Shot 2023-01-31 at 1 25 03 AM" src="https://user-images.githubusercontent.com/23396902/215683311-cd255b10-fe9f-4fbb-b44b-0e108d5050ea.png"> | <img width="612" alt="Screen Shot 2023-01-31 at 1 25 12 AM" src="https://user-images.githubusercontent.com/23396902/215683319-5c6f17fa-cff1-493e-866e-707d8c821738.png"> | <img width="612" alt="Screen Shot 2023-01-31 at 1 25 20 AM" src="https://user-images.githubusercontent.com/23396902/215683343-696db084-3133-48e6-b069-a43429019d22.png"> | Closes #237 [![Windows](https://img.shields.io/badge/OS-Windows-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/<PR>) [![Intel macOS](https://img.shields.io/badge/OS-Intel%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/<PR>) [![Apple Silicon macOS](https://img.shields.io/badge/OS-Apple%20Silicon%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/<PR>) [![ARM64 Android](https://img.shields.io/badge/OS-Android-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/<PR>) ACKs for top commit: johnny9: ACK f0cdf11 Tree-SHA512: c1e2ed67cffab33e593e03ec675b703a97b2e5fa43e1bd7d1164031c05199a5f22716eea69111ebde99aa4f78b2e38e3f7bb7a90f3d5aebbb9df9f0cc3bbf21d
2 parents 2dc7248 + f0cdf11 commit 7cd989d

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

src/qml/controls/OutlineButton.qml

+38-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import QtQuick 2.15
66
import QtQuick.Controls 2.15
77

88
Button {
9+
id: root
910
font.family: "Inter"
1011
font.styleName: "Semi Bold"
1112
font.pixelSize: 18
@@ -17,13 +18,49 @@ Button {
1718
verticalAlignment: Text.AlignVCenter
1819
}
1920
background: Rectangle {
21+
id: bg
2022
implicitHeight: 46
2123
implicitWidth: 340
2224
color: Theme.color.background
2325
radius: 5
26+
state:"DEFAULT"
2427
border {
2528
width: 1
26-
color: Theme.color.neutral4
29+
Behavior on color {
30+
ColorAnimation { duration: 150 }
31+
}
32+
}
33+
34+
states: [
35+
State {
36+
name: "DEFAULT"
37+
PropertyChanges { target: bg; border.color: Theme.color.neutral6}
38+
},
39+
State {
40+
name: "HOVER"
41+
PropertyChanges { target: bg; border.color: Theme.color.neutral9 }
42+
},
43+
State {
44+
name: "PRESSED"
45+
PropertyChanges { target: bg; border.color: Theme.color.orangeLight2 }
46+
}
47+
]
48+
}
49+
MouseArea {
50+
anchors.fill: parent
51+
hoverEnabled: true
52+
onEntered: {
53+
root.background.state = "HOVER"
54+
}
55+
onExited: {
56+
root.background.state = "DEFAULT"
57+
}
58+
onPressed: {
59+
root.background.state = "PRESSED"
60+
}
61+
onReleased: {
62+
root.background.state = "DEFAULT"
63+
root.clicked()
2764
}
2865
}
2966
}

src/qml/pages/initerrormessage.qml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ApplicationWindow {
2323
Header {
2424
Layout.topMargin: 30
2525
Layout.fillWidth: true
26-
bold: true
26+
headerBold: true
2727
header: qsTr("There was an issue starting up.")
2828
headerSize: 21
2929
description: message

0 commit comments

Comments
 (0)