fix: fix dark theme for the wallet

This commit is contained in:
Jonathan Rainville 2020-07-22 16:40:32 -04:00 committed by Iuri Matias
parent c71f5f1a07
commit 3b9ada93d0
5 changed files with 47 additions and 112 deletions

View File

@ -12,7 +12,7 @@ ModalPopup {
// TODO add icon when we have that feature
//% "Status account settings"
title: qsTrId("status-account-settings")
height: 635
height: 675
property int marginBetweenInputs: 35
property string selectedColor: currentAccount.iconColor

View File

@ -16,26 +16,25 @@ Item {
popup.close()
}
Popup {
ModalPopup {
id: popup
modal: true
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
Overlay.modal: Rectangle {
color: "#60000000"
}
parent: Overlay.overlay
x: Math.round((parent.width - width) / 2)
y: Math.round((parent.height - height) / 2)
width: 480
height: 510
background: Rectangle {
color: Style.current.background
radius: Style.current.radius
}
padding: 0
contentItem: SetCurrencyModalContent {
title: qsTr("Settings")
SetCurrencyModalContent {
id: setCurrencyModalContent
}
footer: StyledButton {
anchors.right: parent.right
label: qsTr("Save")
onClicked: {
console.log("TODO: apply all accounts")
popup.close()
}
}
}
}

View File

@ -5,113 +5,50 @@ import "../../../../shared"
import "../data/"
Item {
id: element
property string currency: "USD"
StyledText {
id: modalDialogTitle
text: "Settings"
anchors.top: parent.top
anchors.left: parent.left
font.bold: true
font.pixelSize: 17
anchors.leftMargin: 16
anchors.topMargin: 16
}
SVGImage {
id: closeModalImg
anchors.top: parent.top
anchors.right: parent.right
anchors.rightMargin: 16
anchors.topMargin: 16
source: "../../../../shared/img/close.svg"
width: 25
height: 25
MouseArea {
id: closeModalMouseArea
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: {
popup.close()
}
}
}
Separator {
id: headerSeparator
anchors.top: modalDialogTitle.bottom
}
id: modalBody
anchors.fill: parent
ButtonGroup {
id: currencyGroup
}
Item {
id: modalBody
anchors.right: parent.right
anchors.rightMargin: 32
anchors.top: headerSeparator.top
anchors.topMargin: Style.current.padding
anchors.bottom: footerSeparator.top
anchors.bottomMargin: Style.current.padding
ListView {
anchors.top: parent.top
anchors.topMargin: 10
anchors.left: parent.left
anchors.leftMargin: 32
anchors.right: parent.right
anchors.bottom: parent.bottom
clip: true
spacing: 10
id: tokenListView
model: Currencies {}
ScrollBar.vertical: ScrollBar { active: true }
ListView {
anchors.top: parent.top
anchors.topMargin: 10
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
spacing: 10
id: tokenListView
model: Currencies {}
ScrollBar.vertical: ScrollBar { active: true }
delegate: Component {
Item {
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 10
width: parent.width
height: 52
delegate: Component {
Item {
id: element
StyledText {
text: name + " (" + code + ")"
font.pixelSize: 15
}
RadioButton {
checked: currency === key
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 10
width: parent.width
height: 52
StyledText {
text: name + " (" + code + ")"
font.pixelSize: 15
}
RadioButton {
checked: currency === key
anchors.right: parent.right
ButtonGroup.group: currencyGroup
onClicked: { walletModel.setDefaultCurrency(key) }
}
anchors.rightMargin: 4
ButtonGroup.group: currencyGroup
onClicked: { walletModel.setDefaultCurrency(key) }
}
}
}
}
Separator {
id: footerSeparator
anchors.bottom: parent.bottom
anchors.bottomMargin: 76
}
StyledButton {
anchors.right: parent.right
anchors.rightMargin: Style.current.padding
label: "Save"
anchors.bottom: parent.bottom
anchors.bottomMargin: Style.current.padding
onClicked: {
console.log("TODO: apply all accounts")
popup.close()
}
}
}
/*##^##

View File

@ -58,7 +58,6 @@ Item {
anchors.leftMargin: Style.current.smallPadding
anchors.top: assetInfoImage.top
anchors.topMargin: 0
color: Style.current.black
font.pixelSize: 15
}
StyledText {

View File

@ -141,9 +141,9 @@ Item {
StyledText {
id: itemText
text: itemContainer.label
anchors.left: parent.left
anchors.left: parent ? parent.left : undefined
anchors.leftMargin: 5
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenter: parent ? parent.verticalCenter : undefined
}
onTriggered: function () {