Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ QML_RES_QML = \
qml/components/StorageOptions.qml \
qml/components/StorageSettings.qml \
qml/controls/ContinueButton.qml \
qml/controls/CoreText.qml \
qml/controls/ExternalLink.qml \
qml/controls/Header.qml \
qml/controls/InformationPage.qml \
Expand Down
1 change: 1 addition & 0 deletions src/qml/bitcoin_qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<file>components/StorageOptions.qml</file>
<file>components/StorageSettings.qml</file>
<file>controls/ContinueButton.qml</file>
<file>controls/CoreText.qml</file>
<file>controls/ExternalLink.qml</file>
<file>controls/Header.qml</file>
<file>controls/InformationPage.qml</file>
Expand Down
7 changes: 2 additions & 5 deletions src/qml/components/NetworkIndicator.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@ Button {
id: root
property color bgColor
property int textSize: 15
font.family: "Inter"
font.styleName: "Regular"
font.pixelSize: root.textSize
topPadding: 2
bottomPadding: 2
leftPadding: 7
rightPadding: 7
state: chainModel.currentNetworkName
contentItem: Text {
contentItem: CoreText {
text: root.text
font: root.font
font.pixelSize: root.textSize
color: Theme.color.white
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
Expand Down
11 changes: 3 additions & 8 deletions src/qml/controls/ContinueButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@ import QtQuick.Controls 2.15

Button {
id: root
font.family: "Inter"
font.styleName: "Semi Bold"
font.pixelSize: 18
hoverEnabled: true
contentItem: Text {
contentItem: CoreText {
text: parent.text
font: parent.font
color: Theme.color.white
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
bold: true
font.pixelSize: 18
}
background: Rectangle {
id: bg
Expand Down
18 changes: 18 additions & 0 deletions src/qml/controls/CoreText.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright (c) 2023 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

import QtQuick 2.15
import QtQuick.Controls 2.15

Text {
property bool bold: false
property bool wrap: true
color: Theme.color.white
font.family: "Inter"
font.styleName: bold ? "Semi Bold" : "Regular"
font.pixelSize: 13
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: wrap ? Text.WordWrap : Text.NoWrap
}
5 changes: 2 additions & 3 deletions src/qml/controls/ExternalLink.qml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ AbstractButton {
Layout.fillWidth: true
active: root.description.length > 0
visible: active
sourceComponent: Text {
font.family: "Inter"
font.styleName: "Regular"
sourceComponent: CoreText {
font.pixelSize: root.descriptionSize
color: root.textColor
textFormat: Text.RichText
text: root.description
wrap: false

Behavior on color {
ColorAnimation { duration: 150 }
Expand Down
8 changes: 3 additions & 5 deletions src/qml/controls/NavButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,10 @@ AbstractButton {
bottomPadding: button_background.active ? 0 : 4
rightPadding: 0
leftPadding: button_background.active ? 0 : 20
font.family: "Inter"
font.styleName: "Semi Bold"
font.pixelSize: root.textSize
contentItem: Text {
contentItem: CoreText {
anchors.verticalCenter: parent.verticalCenter
font: container.font
bold: true
font.pixelSize: root.textSize
color: Theme.color.neutral9
text: root.text
}
Expand Down
10 changes: 3 additions & 7 deletions src/qml/controls/OutlineButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ import QtQuick.Controls 2.15

Button {
id: root
font.family: "Inter"
font.styleName: "Semi Bold"
font.pixelSize: 18
hoverEnabled: true
contentItem: Text {
contentItem: CoreText {
text: parent.text
font: parent.font
bold: true
font.pixelSize: 18
color: Theme.color.neutral9
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
id: bg
Expand Down
9 changes: 3 additions & 6 deletions src/qml/controls/TextButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ Button {
property color bgColor: Theme.color.background
property bool bold: true
property bool rightalign: false
font.family: "Inter"
font.styleName: bold ? "Semi Bold" : "Regular"
font.pixelSize: root.textSize
padding: 15
hoverEnabled: true
contentItem: Text {
contentItem: CoreText {
text: root.text
font: root.font
bold: root.bold
font.pixelSize: root.textSize
color: root.textColor
horizontalAlignment: rightalign ? Text.AlignRight : Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
Behavior on color {
ColorAnimation { duration: 150 }
}
Expand Down