feat(@desktop/wallet): Adds enabled state for the token selector needed when Simple send is scrolling
This commit is contained in:
parent
44b5272c5f
commit
a10ca6490b
|
@ -36,6 +36,9 @@ Pane {
|
||||||
|
|
||||||
selected: selectionCheckBox.checked
|
selected: selectionCheckBox.checked
|
||||||
forceHovered: forceHoveredCheckBox.checked
|
forceHovered: forceHoveredCheckBox.checked
|
||||||
|
size: smallCheckBox.checked ? TokenSelectorButton.Size.Small :
|
||||||
|
TokenSelectorButton.Size.Normal
|
||||||
|
|
||||||
|
|
||||||
name: "My token" + (longNameCheckBox.checked ? " long name" : "")
|
name: "My token" + (longNameCheckBox.checked ? " long name" : "")
|
||||||
icon: Constants.tokenIcon("CFI")
|
icon: Constants.tokenIcon("CFI")
|
||||||
|
@ -61,6 +64,13 @@ Pane {
|
||||||
|
|
||||||
text: "force hovered"
|
text: "force hovered"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
id: smallCheckBox
|
||||||
|
|
||||||
|
text: "small"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings {
|
Settings {
|
||||||
|
|
|
@ -190,6 +190,9 @@ Pane {
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
||||||
|
size: smallCheckbox.checked ? TokenSelectorButton.Size.Small :
|
||||||
|
TokenSelectorButton.Size.Normal
|
||||||
|
|
||||||
assetsModel: assetsModelCheckBox.checked ? assetsModel : null
|
assetsModel: assetsModelCheckBox.checked ? assetsModel : null
|
||||||
collectiblesModel: collectiblesModelCheckBox.checked ? collectiblesModel : null
|
collectiblesModel: collectiblesModelCheckBox.checked ? collectiblesModel : null
|
||||||
|
|
||||||
|
@ -215,6 +218,12 @@ Pane {
|
||||||
checked: true
|
checked: true
|
||||||
text: "Collectibles model assigned"
|
text: "Collectibles model assigned"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
id: smallCheckbox
|
||||||
|
|
||||||
|
text: "small"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,9 @@ Control {
|
||||||
/** Exposes insatnce of popup **/
|
/** Exposes insatnce of popup **/
|
||||||
property var popup: dropdown
|
property var popup: dropdown
|
||||||
|
|
||||||
|
/** Sets size of the TokenSelectorButton **/
|
||||||
|
property alias size: tokenSelectorButton.size
|
||||||
|
|
||||||
readonly property bool isTokenSelected: tokenSelectorButton.selected
|
readonly property bool isTokenSelected: tokenSelectorButton.selected
|
||||||
|
|
||||||
signal assetSelected(string key)
|
signal assetSelected(string key)
|
||||||
|
|
|
@ -20,9 +20,17 @@ Control {
|
||||||
property string name
|
property string name
|
||||||
property url icon
|
property url icon
|
||||||
|
|
||||||
|
/** Sets size of the Token Selector Button **/
|
||||||
|
property int size: TokenSelectorButton.Size.Normal
|
||||||
|
|
||||||
signal clicked
|
signal clicked
|
||||||
|
|
||||||
padding: 10
|
enum Size {
|
||||||
|
Small,
|
||||||
|
Normal
|
||||||
|
}
|
||||||
|
|
||||||
|
padding: root.selected ? 0 : 10
|
||||||
|
|
||||||
background: StatusComboboxBackground {
|
background: StatusComboboxBackground {
|
||||||
border.width: 0
|
border.width: 0
|
||||||
|
@ -83,7 +91,9 @@ Control {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
objectName: "tokenSelectorContentItemText"
|
objectName: "tokenSelectorContentItemText"
|
||||||
font.pixelSize: 28
|
font.pixelSize: root.size === TokenSelectorButton.Size.Normal ? 28 : 22
|
||||||
|
lineHeightMode: Text.FixedHeight
|
||||||
|
lineHeight: root.size === TokenSelectorButton.Size.Normal ? 38 : 30
|
||||||
color: root.hovered ? Theme.palette.blue : Theme.palette.darkBlue
|
color: root.hovered ? Theme.palette.blue : Theme.palette.darkBlue
|
||||||
|
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
|
@ -92,6 +92,10 @@ RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumWidth: implicitWidth
|
Layout.maximumWidth: implicitWidth
|
||||||
|
|
||||||
|
size: root.isStickyHeader ?
|
||||||
|
TokenSelectorButton.Size.Small:
|
||||||
|
TokenSelectorButton.Size.Normal
|
||||||
|
|
||||||
assetsModel: root.assetsModel
|
assetsModel: root.assetsModel
|
||||||
collectiblesModel: root.collectiblesModel
|
collectiblesModel: root.collectiblesModel
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue