Skip to content

Commit bbb3112

Browse files
committed
Merge #113: Introduce PageIndicator control
563ee68 qml: introduce PageIndicator control (jarolrod) Pull request description: Broken off from #106 Introduces a PageIndicator control which lets the user know where they are within a Wizard or similar flow. Note: There is no current design file documentation of the specifics for the PageIndicator; therefore, the implementation provided here could be subject to change. A demo of the control can be found here: [pageindicator-demo](https://github.com/jarolrod/gui-qml/tree/pageindicator-demo) | Screenshot of PageIndicator | |-----------------------------| | <img width="95" alt="Screen Shot 2022-02-06 at 4 28 25 AM" src="https://user-images.githubusercontent.com/23396902/152674844-54ad0116-3e07-47ac-82a9-07a932f6513b.png"> | [![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/113) [![macOS](https://img.shields.io/badge/OS-macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/113) [![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/113) ACKs for top commit: hebasto: ACK 563ee68 Tree-SHA512: 2f9a16badd496a9c852a5fd8e930751b4e4bea7a7efba1aad15ba9f47d117616dc0d48b92adfafb6722be42cb5ab6e59facd2e79797f9ae85445f0c5f1af0abb
2 parents ee728df + 563ee68 commit bbb3112

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

src/Makefile.qt.include

+1
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ QML_RES_QML = \
303303
qml/components/StorageOptions.qml \
304304
qml/controls/ContinueButton.qml \
305305
qml/controls/Header.qml \
306+
qml/controls/PageIndicator.qml \
306307
qml/controls/OptionButton.qml \
307308
qml/controls/OptionSwitch.qml \
308309
qml/controls/ProgressIndicator.qml \

src/qml/bitcoin_qml.qrc

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<file>components/StorageOptions.qml</file>
77
<file>controls/ContinueButton.qml</file>
88
<file>controls/Header.qml</file>
9+
<file>controls/PageIndicator.qml</file>
910
<file>controls/OptionButton.qml</file>
1011
<file>controls/OptionSwitch.qml</file>
1112
<file>controls/ProgressIndicator.qml</file>

src/qml/controls/PageIndicator.qml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
8+
PageIndicator {
9+
id: root
10+
delegate: Rectangle {
11+
implicitWidth: 10
12+
implicitHeight: 10
13+
radius: Math.round(width / 2)
14+
color: "white"
15+
opacity: index === root.currentIndex ? 0.95 : pressed ? 0.7 : 0.45
16+
Behavior on opacity {
17+
OpacityAnimator {
18+
duration: 100
19+
}
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)