-
Notifications
You must be signed in to change notification settings - Fork 50
Onboarding views #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Onboarding views #124
Changes from all commits
79e959c
8763690
a17b84e
3c298fe
7db1673
a1bf658
6763cb9
72b85fa
233b721
5118be4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// Copyright (c) 2022 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 | ||
import QtQuick.Layouts 1.15 | ||
import "../controls" | ||
|
||
ColumnLayout { | ||
spacing: 20 | ||
Information { | ||
Layout.fillWidth: true | ||
header: qsTr("Website") | ||
description: qsTr("bitcoincore.org >") | ||
link: "https://bitcoincore.org" | ||
} | ||
Information { | ||
Layout.fillWidth: true | ||
header: qsTr("Source code") | ||
description: qsTr("github.com/bitcoin/bitcoin >") | ||
link: "https://github.com/bitcoin/bitcoin" | ||
} | ||
Information { | ||
Layout.fillWidth: true | ||
header: qsTr("License") | ||
description: qsTr("MIT >") | ||
link: "https://opensource.org/licenses/MIT" | ||
} | ||
Information { | ||
Layout.fillWidth: true | ||
header: qsTr("Version") | ||
description: qsTr("v22.99.0-1e7564eca8a6 >") | ||
link: "https://bitcoin.org/en/download" | ||
} | ||
RowLayout { | ||
Header { | ||
Layout.fillWidth: true | ||
center: false | ||
header: qsTr("Developer options") | ||
headerSize: 18 | ||
description: qsTr("Only use these if you have development experience") | ||
descriptionSize: 15 | ||
descriptionMargin: 10 | ||
wrap: false | ||
} | ||
Loader { | ||
Layout.fillWidth: true | ||
Layout.preferredWidth: 0 | ||
Layout.alignment: Qt.AlignRight | ||
Layout.rightMargin: 5 | ||
active: true | ||
visible: active | ||
sourceComponent: TextButton { | ||
text: ">" | ||
bold: false | ||
rightalign: true | ||
onClicked: { | ||
introductions.incrementCurrentIndex() | ||
swipeView.inSubPage = true | ||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright (c) 2022 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 | ||
import QtQuick.Layouts 1.15 | ||
import "../controls" | ||
|
||
ColumnLayout { | ||
spacing: 20 | ||
Information { | ||
Layout.fillWidth: true | ||
header: qsTr("Developer documentation") | ||
hasIcon: true | ||
iconSource: "qrc:/icons/export" | ||
link: "https://bitcoin.org/en/bitcoin-core/contribute/documentation" | ||
} | ||
Setting { | ||
Layout.fillWidth: true | ||
header: qsTr("Storage limit") | ||
} | ||
Information { | ||
Layout.fillWidth: true | ||
header: qsTr("Network") | ||
description: qsTr("Mainnet") | ||
isReadonly: false | ||
} | ||
Information { | ||
Layout.fillWidth: true | ||
header: qsTr("Other option...") | ||
description: qsTr("42") | ||
isReadonly: false | ||
} | ||
Setting { | ||
Layout.fillWidth: true | ||
header: qsTr("Other option...") | ||
description: qsTr("Description...") | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) 2022 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 | ||
import QtQuick.Layouts 1.15 | ||
import "../controls" | ||
|
||
ColumnLayout { | ||
ButtonGroup { | ||
id: group | ||
} | ||
spacing: 15 | ||
OptionButton { | ||
ButtonGroup.group: group | ||
text: qsTr("SD Card") | ||
description: qsTr("The available space is large enough for full block storage. ") | ||
recommended: true | ||
checked: true | ||
} | ||
OptionButton { | ||
ButtonGroup.group: group | ||
text: qsTr("Hard drive") | ||
description: qsTr("Available space only allows for partial block storage.") | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) 2022 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 | ||
import QtQuick.Layouts 1.15 | ||
import "../controls" | ||
|
||
ColumnLayout { | ||
spacing: 20 | ||
Setting { | ||
Layout.fillWidth: true | ||
header: qsTr("Store Recent blocks only") | ||
} | ||
Information { | ||
Layout.fillWidth: true | ||
header: qsTr("Storage limit") | ||
description: qsTr("75 GB") | ||
isReadonly: false | ||
} | ||
Information { | ||
Layout.fillWidth: true | ||
header: qsTr("Data location") | ||
description: qsTr("c://.../data") | ||
isReadonly: false | ||
} | ||
Information { | ||
Layout.fillWidth: true | ||
header: qsTr("Block location") | ||
description: qsTr("c://.../blocks") | ||
isReadonly: false | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ Control { | |
property string subtext | ||
property int subtextMargin | ||
property int subtextSize: 15 | ||
property bool wrap: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you could make this it's own commit: qml: customizable wrap mode in Header control diff --git a/src/qml/controls/Header.qml b/src/qml/controls/Header.qml
index 59fb01671..c7adcf309 100644
--- a/src/qml/controls/Header.qml
+++ b/src/qml/controls/Header.qml
@@ -19,6 +19,7 @@ Control {
property string subtext
property int subtextMargin
property int subtextSize: 15
+ property bool wrap: true
contentItem: ColumnLayout {
spacing: 0
Label {
@@ -31,7 +32,7 @@ Control {
color: Theme.color.neutral9
text: root.header
horizontalAlignment: center ? Text.AlignHCenter : Text.AlignLeft
- wrapMode: Text.WordWrap
+ wrapMode: wrap ? Text.WordWrap : Text.NoWrap
}
Loader {
Layout.fillWidth: true
@@ -46,7 +47,7 @@ Control {
color: Theme.color.neutral8
text: root.description
horizontalAlignment: root.center ? Text.AlignHCenter : Text.AlignLeft
- wrapMode: Text.WordWrap
+ wrapMode: wrap ? Text.WordWrap : Text.NoWrap
}
}
Loader {
@@ -62,7 +63,7 @@ Control {
color: Theme.color.neutral9
text: root.subtext
horizontalAlignment: root.center ? Text.AlignHCenter : Text.AlignLeft
- wrapMode: Text.WordWrap
+ wrapMode: wrap ? Text.WordWrap : Text.NoWrap
}
}
} |
||
contentItem: ColumnLayout { | ||
spacing: 0 | ||
Label { | ||
|
@@ -27,11 +28,11 @@ Control { | |
topPadding: root.headerMargin | ||
font.family: "Inter" | ||
font.styleName: root.bold ? "Semi Bold" : "Regular" | ||
font.pointSize: root.headerSize | ||
font.pixelSize: root.headerSize | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in 8763690, you didn't update the PR description to state that we are now using qml: use font pixelSize instead of pointSize diff --git a/src/qml/controls/ContinueButton.qml b/src/qml/controls/ContinueButton.qml
index 2b98f8baf..d478ba45e 100644
--- a/src/qml/controls/ContinueButton.qml
+++ b/src/qml/controls/ContinueButton.qml
@@ -8,7 +8,7 @@ import QtQuick.Controls 2.15
Button {
font.family: "Inter"
font.styleName: "Semi Bold"
- font.pointSize: 18
+ font.pixelSize: 18
contentItem: Text {
text: parent.text
font: parent.font
diff --git a/src/qml/controls/Header.qml b/src/qml/controls/Header.qml
index 13d42e1c4..59fb01671 100644
--- a/src/qml/controls/Header.qml
+++ b/src/qml/controls/Header.qml
@@ -27,7 +27,7 @@ Control {
topPadding: root.headerMargin
font.family: "Inter"
font.styleName: root.bold ? "Semi Bold" : "Regular"
- font.pointSize: root.headerSize
+ font.pixelSize: root.headerSize
color: Theme.color.neutral9
text: root.header
horizontalAlignment: center ? Text.AlignHCenter : Text.AlignLeft
@@ -42,7 +42,7 @@ Control {
topPadding: root.descriptionMargin
font.family: "Inter"
font.styleName: "Regular"
- font.pointSize: root.descriptionSize
+ font.pixelSize: root.descriptionSize
color: Theme.color.neutral8
text: root.description
horizontalAlignment: root.center ? Text.AlignHCenter : Text.AlignLeft
diff --git a/src/qml/controls/TextButton.qml b/src/qml/controls/TextButton.qml
index 1063a275b..2dce44670 100644
--- a/src/qml/controls/TextButton.qml
+++ b/src/qml/controls/TextButton.qml
@@ -11,7 +11,7 @@ Button {
property string textColor: Theme.color.neutral9
font.family: "Inter"
font.styleName: "Semi Bold"
- font.pointSize: root.textSize
+ font.pixelSize: root.textSize
contentItem: Text {
text: root.text
font: root.font
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with your suggestion regarding splitting the commits and rewriting the commit message. And hence I tried to incorporate them. |
||
color: Theme.color.neutral9 | ||
text: root.header | ||
horizontalAlignment: center ? Text.AlignHCenter : Text.AlignLeft | ||
wrapMode: Text.WordWrap | ||
wrapMode: wrap ? Text.WordWrap : Text.NoWrap | ||
} | ||
Loader { | ||
Layout.fillWidth: true | ||
|
@@ -42,11 +43,11 @@ Control { | |
topPadding: root.descriptionMargin | ||
font.family: "Inter" | ||
font.styleName: "Regular" | ||
font.pointSize: root.descriptionSize | ||
font.pixelSize: root.descriptionSize | ||
color: Theme.color.neutral8 | ||
text: root.description | ||
horizontalAlignment: root.center ? Text.AlignHCenter : Text.AlignLeft | ||
wrapMode: Text.WordWrap | ||
wrapMode: wrap ? Text.WordWrap : Text.NoWrap | ||
} | ||
} | ||
Loader { | ||
|
@@ -62,7 +63,7 @@ Control { | |
color: Theme.color.neutral9 | ||
text: root.subtext | ||
horizontalAlignment: root.center ? Text.AlignHCenter : Text.AlignLeft | ||
wrapMode: Text.WordWrap | ||
wrapMode: wrap ? Text.WordWrap : Text.NoWrap | ||
} | ||
} | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.