fix: hover state, title and show scrollbar currency list modal
This commit is contained in:
parent
6e7bb6ba1c
commit
6f76d079ae
|
@ -21,8 +21,7 @@ Item {
|
||||||
width: 480
|
width: 480
|
||||||
height: 510
|
height: 510
|
||||||
|
|
||||||
//% "Settings"
|
title: qsTr("Set Currency")
|
||||||
title: qsTrId("settings")
|
|
||||||
|
|
||||||
SetCurrencyModalContent {
|
SetCurrencyModalContent {
|
||||||
id: setCurrencyModalContent
|
id: setCurrencyModalContent
|
||||||
|
|
|
@ -16,19 +16,26 @@ Item {
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 10
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
spacing: 10
|
spacing: 10
|
||||||
id: tokenListView
|
id: tokenListView
|
||||||
model: Currencies {}
|
model: Currencies {}
|
||||||
ScrollBar.vertical: ScrollBar { active: true }
|
ScrollBar.vertical: ScrollBar {
|
||||||
|
active: true
|
||||||
|
policy: tokenListView.contentHeight > tokenListView.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
||||||
|
}
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
|
||||||
delegate: Component {
|
delegate: Component {
|
||||||
Item {
|
Rectangle {
|
||||||
|
id: wrapper
|
||||||
|
property bool hovered: false
|
||||||
|
radius: Style.current.radius
|
||||||
|
color: currency === key ? Style.current.lightBlue : (hovered ? Style.current.grey: Style.current.transparent)
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 0
|
anchors.rightMargin: 0
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -39,15 +46,31 @@ Item {
|
||||||
StyledText {
|
StyledText {
|
||||||
text: name + " (" + code + ")"
|
text: name + " (" + code + ")"
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: Style.current.padding
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusRadioButton {
|
StatusRadioButton {
|
||||||
checked: currency === key
|
checked: currency === key
|
||||||
|
isHovered: wrapper.hovered
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 4
|
anchors.rightMargin: Style.current.padding
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
ButtonGroup.group: currencyGroup
|
ButtonGroup.group: currencyGroup
|
||||||
onClicked: { walletModel.setDefaultCurrency(key) }
|
onClicked: { walletModel.setDefaultCurrency(key) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: {
|
||||||
|
wrapper.hovered = true
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
wrapper.hovered = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue