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