Skip to content

Commit 3a7b865

Browse files
committed
qml: introduce OnboardingNav control
1 parent f4dc006 commit 3a7b865

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

src/Makefile.qt.include

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ QML_RES_QML = \
318318
qml/controls/NavButton.qml \
319319
qml/controls/PageIndicator.qml \
320320
qml/controls/OnboardingInfo.qml \
321+
qml/controls/OnboardingNav.qml \
321322
qml/controls/OptionButton.qml \
322323
qml/controls/OptionSwitch.qml \
323324
qml/controls/ProgressIndicator.qml \

src/qml/bitcoin_qml.qrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<file>controls/NavButton.qml</file>
1515
<file>controls/PageIndicator.qml</file>
1616
<file>controls/OnboardingInfo.qml</file>
17+
<file>controls/OnboardingNav.qml</file>
1718
<file>controls/OptionButton.qml</file>
1819
<file>controls/OptionSwitch.qml</file>
1920
<file>controls/ProgressIndicator.qml</file>

src/qml/controls/OnboardingNav.qml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (c) 2022 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 QtQuick.Layouts 1.15
8+
9+
Control {
10+
id: root
11+
property alias navButton: button_loader.sourceComponent
12+
property bool alignLeft: true
13+
height: 46
14+
contentItem: RowLayout {
15+
spacing: 0
16+
Layout.fillWidth: true
17+
Loader {
18+
id: button_loader
19+
Layout.rightMargin: 10
20+
Layout.alignment: root.alignLeft ? Qt.AlignLeft : Qt.AlignRight
21+
active: true
22+
visible: active
23+
sourceComponent: root.navButton
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)