File tree 10 files changed +68
-8
lines changed
10 files changed +68
-8
lines changed Original file line number Diff line number Diff line change @@ -347,6 +347,7 @@ QML_RES_QML = \
347
347
qml/controls/ContinueButton.qml \
348
348
qml/controls/CoreText.qml \
349
349
qml/controls/ExternalLink.qml \
350
+ qml/controls/FocusBorder.qml \
350
351
qml/controls/Header.qml \
351
352
qml/controls/InformationPage.qml \
352
353
qml/controls/NavButton.qml \
Original file line number Diff line number Diff line change 17
17
<file>controls/ContinueButton.qml</file>
18
18
<file>controls/CoreText.qml</file>
19
19
<file>controls/ExternalLink.qml</file>
20
+ <file>controls/FocusBorder.qml</file>
20
21
<file>controls/Header.qml</file>
21
22
<file>controls/InformationPage.qml</file>
22
23
<file>controls/NavButton.qml</file>
Original file line number Diff line number Diff line change 24
24
property bool synced: nodeModel .verificationProgress > 0.999
25
25
property bool paused: false
26
26
27
+ activeFocusOnTab: true
28
+
27
29
BlockClockDial {
28
30
id: dial
29
31
anchors .fill : parent
81
83
root .paused = ! root .paused
82
84
nodeModel .pause = root .paused
83
85
}
86
+ FocusBorder {
87
+ visible: root .activeFocus
88
+ }
84
89
}
85
90
86
91
states: [
Original file line number Diff line number Diff line change @@ -34,5 +34,9 @@ Button {
34
34
Behavior on color {
35
35
ColorAnimation { duration: 150 }
36
36
}
37
+
38
+ FocusBorder {
39
+ visible: root .visualFocus
40
+ }
37
41
}
38
42
}
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2023 The Bitcoin Core developers
2
+ // Distributed under the MIT software license, see the accompanying
3
+ // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
+
5
+ import QtQuick 2.15
6
+ import QtQuick.Controls 2.15
7
+ import "../controls"
8
+
9
+
10
+ Rectangle {
11
+ id: root
12
+ property int topMargin: - 4
13
+ property int bottomMargin: - 4
14
+ property int leftMargin: - 4
15
+ property int rightMargin: - 4
16
+ property int borderRadius: 9
17
+
18
+ anchors .fill : parent
19
+ anchors .topMargin : root .topMargin
20
+ anchors .bottomMargin : root .bottomMargin
21
+ anchors .leftMargin : root .leftMargin
22
+ anchors .rightMargin : root .rightMargin
23
+ border .width : 2
24
+ border .color : Theme .color .purple
25
+ radius: root .borderRadius
26
+ color: " transparent"
27
+
28
+ Behavior on border .color {
29
+ ColorAnimation { duration: 150 }
30
+ }
31
+
32
+ Behavior on visible {
33
+ NumberAnimation { duration: 150 }
34
+ }
35
+ }
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ AbstractButton {
41
41
}
42
42
]
43
43
44
+ FocusBorder {
45
+ visible: root .visualFocus
46
+ }
47
+
44
48
Behavior on color {
45
49
ColorAnimation { duration: 150 }
46
50
}
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ RowLayout {
19
19
Layout .preferredWidth : parent .width / 3
20
20
Loader {
21
21
Layout .alignment : Qt .AlignLeft
22
+ Layout .topMargin : 4
23
+ Layout .leftMargin : 4
22
24
id: left_detail
23
25
active: true
24
26
visible: active
@@ -40,6 +42,8 @@ RowLayout {
40
42
Loader {
41
43
id: right_detail
42
44
Layout .alignment : Qt .AlignRight
45
+ Layout .topMargin : 4
46
+ Layout .rightMargin : 4
43
47
active: true
44
48
visible: active
45
49
sourceComponent: root .rightDetail
Original file line number Diff line number Diff line change @@ -18,15 +18,9 @@ Button {
18
18
border .color : button .checked ? Theme .color .orange : button .hovered ? Theme .color .neutral9 : Theme .color .neutral5
19
19
radius: 10
20
20
color: " transparent"
21
- Rectangle {
21
+ FocusBorder {
22
22
visible: button .visualFocus
23
- anchors .fill : parent
24
- anchors .margins : - 4
25
- border .width : 2
26
- border .color : Theme .color .orange
27
- radius: 14
28
- color: " transparent"
29
- opacity: 0.4
23
+ borderRadius: 14
30
24
}
31
25
}
32
26
contentItem: RowLayout {
Original file line number Diff line number Diff line change @@ -44,6 +44,14 @@ AbstractButton {
44
44
}
45
45
]
46
46
47
+ background: FocusBorder {
48
+ visible: root .visualFocus
49
+ topMargin: - 4
50
+ bottomMargin: - 4
51
+ leftMargin: - 6
52
+ rightMargin: - 6
53
+ }
54
+
47
55
MouseArea {
48
56
id: mouseArea
49
57
anchors .fill : root
Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ Button {
31
31
Behavior on color {
32
32
ColorAnimation { duration: 150 }
33
33
}
34
+
35
+ FocusBorder {
36
+ visible: root .visualFocus
37
+ }
34
38
}
35
39
states: [
36
40
State {
You can’t perform that action at this time.
0 commit comments