Skip to content

Commit

Permalink
qml: Add property to hide NetworkIndicator on BlockClock page
Browse files Browse the repository at this point in the history
The network indicator is redundant on the block clock page when
in Desktop wallet mode.
  • Loading branch information
johnny9 committed Apr 5, 2024
1 parent 4b79ac2 commit 6e42abc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/qml/components/BlockClock.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Item {
id: root
property real parentWidth: 600
property real parentHeight: 600
property bool showNetworkIndicator: true

width: dial.width
height: dial.height + networkIndicator.height + networkIndicator.anchors.topMargin
Expand Down Expand Up @@ -146,6 +147,7 @@ Item {

NetworkIndicator {
id: networkIndicator
show: root.showNetworkIndicator
anchors.top: dial.bottom
anchors.topMargin: networkIndicator.visible ? 30 : 0
anchors.horizontalCenter: root.horizontalCenter
Expand Down
3 changes: 2 additions & 1 deletion src/qml/components/NetworkIndicator.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ import org.bitcoincore.qt 1.0
Button {
id: root
property color bgColor
property bool show: true
property int textSize: 15
topPadding: 2
bottomPadding: 2
leftPadding: 7
rightPadding: 7
state: chainModel.currentNetworkName
state: show ? chainModel.currentNetworkName : "MAIN"
contentItem: CoreText {
text: root.text
font.pixelSize: root.textSize
Expand Down
1 change: 1 addition & 0 deletions src/qml/pages/wallet/DesktopWallets.qml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ Page {
parentWidth: parent.width - 40
parentHeight: parent.height
anchors.centerIn: parent
showNetworkIndicator: false
}
}
NodeSettings {
Expand Down

0 comments on commit 6e42abc

Please sign in to comment.