File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ import QtQuick.Layouts 1.15
8
8
import "../controls"
9
9
10
10
ColumnLayout {
11
+ id: root
12
+ property bool customStorage: false
13
+ property int customStorageAmount
11
14
ButtonGroup {
12
15
id: group
13
16
}
@@ -18,7 +21,7 @@ ColumnLayout {
18
21
text: qsTr (" Reduce storage" )
19
22
description: qsTr (" Uses about 2GB. For simple wallet use." )
20
23
recommended: true
21
- checked: true
24
+ checked: ! root . customStorage && optionsModel . prune
22
25
onClicked: {
23
26
optionsModel .prune = true
24
27
optionsModel .pruneSizeGB = 2
@@ -32,9 +35,25 @@ ColumnLayout {
32
35
Layout .fillWidth : true
33
36
ButtonGroup .group : group
34
37
text: qsTr (" Store all data" )
38
+ checked: ! optionsModel .prune
35
39
description: qsTr (" Uses about 550GB. Support the network." )
36
40
onClicked: {
37
41
optionsModel .prune = false
38
42
}
39
43
}
44
+ Loader {
45
+ Layout .fillWidth : true
46
+ active: root .customStorage
47
+ visible: active
48
+ sourceComponent: OptionButton {
49
+ ButtonGroup .group : group
50
+ checked: root .customStorage && optionsModel .prune
51
+ text: qsTr (" Custom" )
52
+ description: qsTr (" Storing recent blocks up to %1GB" ).arg (root .customStorageAmount )
53
+ onClicked: {
54
+ optionsModel .prune = true
55
+ optionsModel .pruneSizeGB = root .customStorageAmount
56
+ }
57
+ }
58
+ }
40
59
}
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ import QtQuick.Layouts 1.15
8
8
import "../controls"
9
9
10
10
ColumnLayout {
11
+ id: root
12
+ property bool customStorage: false
13
+ property int customStorageAmount
11
14
spacing: 4
12
15
Setting {
13
16
Layout .fillWidth : true
@@ -42,6 +45,8 @@ ColumnLayout {
42
45
if (parseInt (text) < 1 ) {
43
46
pruneTargetSetting .showErrorText = true
44
47
} else {
48
+ root .customStorage = true
49
+ root .customStorageAmount = parseInt (text)
45
50
optionsModel .pruneSizeGB = parseInt (text)
46
51
pruneTargetSetting .forceActiveFocus ()
47
52
pruneTargetSetting .showErrorText = false
Original file line number Diff line number Diff line change 33
33
detailItem: ColumnLayout {
34
34
spacing: 0
35
35
StorageOptions {
36
+ customStorage: advancedStorage .loadedDetailItem .customStorage
37
+ customStorageAmount: advancedStorage .loadedDetailItem .customStorageAmount
36
38
Layout .maximumWidth : 450
37
39
Layout .alignment : Qt .AlignCenter
38
40
}
47
49
buttonMargin: 20
48
50
}
49
51
SettingsStorage {
52
+ id: advancedStorage
50
53
navRightDetail: NavButton {
51
54
text: qsTr (" Done" )
52
55
onClicked: {
You can’t perform that action at this time.
0 commit comments