File tree Expand file tree Collapse file tree 10 files changed +68
-8
lines changed
Expand file tree Collapse file tree 10 files changed +68
-8
lines changed Original file line number Diff line number Diff line change @@ -347,6 +347,7 @@ QML_RES_QML = \
347347 qml/controls/ContinueButton.qml \
348348 qml/controls/CoreText.qml \
349349 qml/controls/ExternalLink.qml \
350+ qml/controls/FocusBorder.qml \
350351 qml/controls/Header.qml \
351352 qml/controls/InformationPage.qml \
352353 qml/controls/NavButton.qml \
Original file line number Diff line number Diff line change 1717 <file>controls/ContinueButton.qml</file>
1818 <file>controls/CoreText.qml</file>
1919 <file>controls/ExternalLink.qml</file>
20+ <file>controls/FocusBorder.qml</file>
2021 <file>controls/Header.qml</file>
2122 <file>controls/InformationPage.qml</file>
2223 <file>controls/NavButton.qml</file>
Original file line number Diff line number Diff line change 2424 property bool synced: nodeModel .verificationProgress > 0.999
2525 property bool paused: false
2626
27+ activeFocusOnTab: true
28+
2729 BlockClockDial {
2830 id: dial
2931 anchors .fill : parent
8183 root .paused = ! root .paused
8284 nodeModel .pause = root .paused
8385 }
86+ FocusBorder {
87+ visible: root .activeFocus
88+ }
8489 }
8590
8691 states: [
Original file line number Diff line number Diff line change @@ -34,5 +34,9 @@ Button {
3434 Behavior on color {
3535 ColorAnimation { duration: 150 }
3636 }
37+
38+ FocusBorder {
39+ visible: root .visualFocus
40+ }
3741 }
3842}
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 {
4141 }
4242 ]
4343
44+ FocusBorder {
45+ visible: root .visualFocus
46+ }
47+
4448 Behavior on color {
4549 ColorAnimation { duration: 150 }
4650 }
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ RowLayout {
1919 Layout .preferredWidth : parent .width / 3
2020 Loader {
2121 Layout .alignment : Qt .AlignLeft
22+ Layout .topMargin : 4
23+ Layout .leftMargin : 4
2224 id: left_detail
2325 active: true
2426 visible: active
@@ -40,6 +42,8 @@ RowLayout {
4042 Loader {
4143 id: right_detail
4244 Layout .alignment : Qt .AlignRight
45+ Layout .topMargin : 4
46+ Layout .rightMargin : 4
4347 active: true
4448 visible: active
4549 sourceComponent: root .rightDetail
Original file line number Diff line number Diff line change @@ -18,15 +18,9 @@ Button {
1818 border .color : button .checked ? Theme .color .orange : button .hovered ? Theme .color .neutral9 : Theme .color .neutral5
1919 radius: 10
2020 color: " transparent"
21- Rectangle {
21+ FocusBorder {
2222 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
3024 }
3125 }
3226 contentItem: RowLayout {
Original file line number Diff line number Diff line change @@ -44,6 +44,14 @@ AbstractButton {
4444 }
4545 ]
4646
47+ background: FocusBorder {
48+ visible: root .visualFocus
49+ topMargin: - 4
50+ bottomMargin: - 4
51+ leftMargin: - 6
52+ rightMargin: - 6
53+ }
54+
4755 MouseArea {
4856 id: mouseArea
4957 anchors .fill : root
Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ Button {
3131 Behavior on color {
3232 ColorAnimation { duration: 150 }
3333 }
34+
35+ FocusBorder {
36+ visible: root .visualFocus
37+ }
3438 }
3539 states: [
3640 State {
You can’t perform that action at this time.
0 commit comments