mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 08:17:59 +00:00
Radio buttons for the welcome wizard
This commit is contained in:
parent
610682c2be
commit
c40944144a
2 changed files with 12 additions and 14 deletions
|
@ -39,6 +39,9 @@ RowLayout {
|
||||||
property alias fontColor: label.color
|
property alias fontColor: label.color
|
||||||
signal clicked()
|
signal clicked()
|
||||||
height: 26 * scaleRatio
|
height: 26 * scaleRatio
|
||||||
|
// legacy properties
|
||||||
|
property var checkedColor: "white"
|
||||||
|
property var borderColor: checked ? Qt.rgba(1, 1, 1, 0.35) : Qt.rgba(1, 1, 1, 0.25)
|
||||||
|
|
||||||
function toggle(){
|
function toggle(){
|
||||||
radioButton.checked = !radioButton.checked
|
radioButton.checked = !radioButton.checked
|
||||||
|
@ -52,7 +55,7 @@ RowLayout {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
y: 0
|
y: 0
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
border.color: radioButton.checked ? Qt.rgba(1, 1, 1, 0.35) : Qt.rgba(1, 1, 1, 0.25)
|
border.color: borderColor
|
||||||
width: radioButton.height
|
width: radioButton.height
|
||||||
height: radioButton.height
|
height: radioButton.height
|
||||||
radius: radioButton.height
|
radius: radioButton.height
|
||||||
|
@ -61,7 +64,7 @@ RowLayout {
|
||||||
visible: radioButton.checked
|
visible: radioButton.checked
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: "white"
|
color: checkedColor
|
||||||
width: 10 * scaleRatio
|
width: 10 * scaleRatio
|
||||||
height: 10 * scaleRatio
|
height: 10 * scaleRatio
|
||||||
radius: 10
|
radius: 10
|
||||||
|
|
|
@ -227,9 +227,6 @@ ColumnLayout {
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
@ -238,18 +235,17 @@ ColumnLayout {
|
||||||
Layout.topMargin: 30 * scaleRatio
|
Layout.topMargin: 30 * scaleRatio
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: 50 * scaleRatio
|
spacing: 38 * scaleRatio
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: 100 * scaleRatio
|
width: 100 * scaleRatio
|
||||||
CheckBox {
|
RadioButton {
|
||||||
id: testNet
|
id: testNet
|
||||||
text: qsTr("Testnet") + translationManager.emptyString
|
text: qsTr("Testnet") + translationManager.emptyString
|
||||||
background: "#FFFFFF"
|
checkedColor: Qt.rgba(0, 0, 0, 0.75)
|
||||||
|
borderColor: Qt.rgba(0, 0, 0, 0.45)
|
||||||
fontColor: "#4A4646"
|
fontColor: "#4A4646"
|
||||||
fontSize: 16 * scaleRatio
|
fontSize: 16 * scaleRatio
|
||||||
checkedIcon: "../images/checkedBlackIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
checked: appWindow.persistentSettings.nettype == NetworkType.TESTNET;
|
checked: appWindow.persistentSettings.nettype == NetworkType.TESTNET;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
persistentSettings.nettype = testNet.checked ? NetworkType.TESTNET : NetworkType.MAINNET
|
persistentSettings.nettype = testNet.checked ? NetworkType.TESTNET : NetworkType.MAINNET
|
||||||
|
@ -261,14 +257,13 @@ ColumnLayout {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: 100 * scaleRatio
|
width: 100 * scaleRatio
|
||||||
CheckBox {
|
RadioButton {
|
||||||
id: stageNet
|
id: stageNet
|
||||||
text: qsTr("Stagenet") + translationManager.emptyString
|
text: qsTr("Stagenet") + translationManager.emptyString
|
||||||
background: "#FFFFFF"
|
checkedColor: Qt.rgba(0, 0, 0, 0.75)
|
||||||
|
borderColor: Qt.rgba(0, 0, 0, 0.45)
|
||||||
fontColor: "#4A4646"
|
fontColor: "#4A4646"
|
||||||
fontSize: 16 * scaleRatio
|
fontSize: 16 * scaleRatio
|
||||||
checkedIcon: "../images/checkedBlackIcon.png"
|
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
|
||||||
checked: appWindow.persistentSettings.nettype == NetworkType.STAGENET;
|
checked: appWindow.persistentSettings.nettype == NetworkType.STAGENET;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
persistentSettings.nettype = stageNet.checked ? NetworkType.STAGENET : NetworkType.MAINNET
|
persistentSettings.nettype = stageNet.checked ? NetworkType.STAGENET : NetworkType.MAINNET
|
||||||
|
|
Loading…
Reference in a new issue