Skip to content

Commit 1ec4269

Browse files
jarolrodhebasto
authored andcommitted
qml: add check mark to OptionButton control
This does away with a loadable detail and places a check mark icon in it's place. Github-Pull: #205 Rebased-From: 2c8ac00
1 parent a830232 commit 1ec4269

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

src/qml/BitcoinApp/Components/ConnectionOptions.qml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,5 @@ ColumnLayout {
3131
ButtonGroup.group: group
3232
text: qsTr("Only when on Wi-Fi")
3333
description: qsTr("Loads quickly when on wi-fi and pauses when on cellular data.")
34-
detail: ProgressIndicator {
35-
implicitWidth: 50
36-
SequentialAnimation on progress {
37-
loops: Animation.Infinite
38-
SmoothedAnimation { to: 1; velocity: 1; }
39-
SmoothedAnimation { to: 0; velocity: 1; }
40-
}
41-
}
4234
}
4335
}

src/qml/BitcoinApp/Components/StorageOptions.qml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,11 @@ ColumnLayout {
1919
description: qsTr("Uses about 2GB.")
2020
recommended: true
2121
checked: true
22-
detail: ProgressIndicator {
23-
implicitWidth: 75
24-
progress: 0.25
25-
}
2622
}
2723
OptionButton {
2824
Layout.fillWidth: true
2925
ButtonGroup.group: group
3026
text: qsTr("Default")
3127
description: qsTr("Uses about 423GB.")
32-
detail: ProgressIndicator {
33-
implicitWidth: 75
34-
progress: 0.8
35-
}
3628
}
3729
}

src/qml/BitcoinApp/Controls/OptionButton.qml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Button {
1212
id: button
1313
padding: 15
1414
checkable: true
15-
property alias detail: detail_loader.sourceComponent
1615
implicitWidth: 450
1716
background: Rectangle {
1817
border.width: 1
@@ -67,7 +66,15 @@ Button {
6766
}
6867
Loader {
6968
id: detail_loader
70-
visible: item
69+
visible: button.checked
70+
active: true
71+
sourceComponent: Button {
72+
icon.source: "image://images/check"
73+
icon.color: Theme.color.neutral9
74+
icon.height: 24
75+
icon.width: 24
76+
background: null
77+
}
7178
}
7279
}
7380
}

0 commit comments

Comments
 (0)