Skip to content

Commit 2bd516d

Browse files
committed
qml: add CaretRightButton component
This encapsulates a commonly used button into a reusable component.
1 parent 4ca3b72 commit 2bd516d

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

src/Makefile.qt.include

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ QML_RES_QML = \
330330
qml/components/AboutOptions.qml \
331331
qml/components/BlockClock.qml \
332332
qml/components/BlockCounter.qml \
333+
qml/components/CaretRightButton.qml \
333334
qml/components/ConnectionOptions.qml \
334335
qml/components/ConnectionSettings.qml \
335336
qml/components/DeveloperOptions.qml \

src/qml/bitcoin_qml.qrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<file>components/AboutOptions.qml</file>
44
<file>components/BlockClock.qml</file>
55
<file>components/BlockCounter.qml</file>
6+
<file>components/CaretRightButton.qml</file>
67
<file>components/ConnectionOptions.qml</file>
78
<file>components/ConnectionSettings.qml</file>
89
<file>components/DeveloperOptions.qml</file>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
8+
Button {
9+
id: root
10+
required property color stateColor
11+
icon.source: "image://images/caret-right"
12+
icon.color: root.stateColor
13+
icon.height: 18
14+
icon.width: 18
15+
background: null
16+
17+
Behavior on icon.color {
18+
ColorAnimation { duration: 150 }
19+
}
20+
}

0 commit comments

Comments
 (0)