fix(wallet): Constrain token name size to send modal width (#15859)
This commit is contained in:
parent
31ade3e742
commit
dd25572c28
|
@ -22,6 +22,8 @@ Control {
|
||||||
/** Expected model structure: see TokenSelectorPanel::collectiblesModel **/
|
/** Expected model structure: see TokenSelectorPanel::collectiblesModel **/
|
||||||
property alias collectiblesModel: tokenSelectorPanel.collectiblesModel
|
property alias collectiblesModel: tokenSelectorPanel.collectiblesModel
|
||||||
|
|
||||||
|
readonly property bool isTokenSelected: d.isTokenSelected
|
||||||
|
|
||||||
signal assetSelected(string key)
|
signal assetSelected(string key)
|
||||||
signal collectionSelected(string key)
|
signal collectionSelected(string key)
|
||||||
signal collectibleSelected(string key)
|
signal collectibleSelected(string key)
|
||||||
|
@ -90,8 +92,10 @@ Control {
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: Style.current.halfPadding
|
spacing: Style.current.halfPadding
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
StatusRoundedImage {
|
StatusRoundedImage {
|
||||||
|
id: tokenSelectorIcon
|
||||||
objectName: "tokenSelectorIcon"
|
objectName: "tokenSelectorIcon"
|
||||||
Layout.preferredWidth: 20
|
Layout.preferredWidth: 20
|
||||||
Layout.preferredHeight: 20
|
Layout.preferredHeight: 20
|
||||||
|
@ -102,12 +106,24 @@ Control {
|
||||||
objectName: "tokenSelectorContentItemText"
|
objectName: "tokenSelectorContentItemText"
|
||||||
font.pixelSize: 28
|
font.pixelSize: 28
|
||||||
color: root.hovered ? Theme.palette.blue : Theme.palette.darkBlue
|
color: root.hovered ? Theme.palette.blue : Theme.palette.darkBlue
|
||||||
|
Layout.maximumWidth: parent.width - (tokenSelectorIcon.width + comboboxIndicator.width + parent.spacing * 2)
|
||||||
|
elide: Text.ElideRight
|
||||||
|
Layout.alignment: Qt.AlignLeft
|
||||||
|
|
||||||
text: d.currentName
|
text: d.currentName
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusComboboxIndicator {
|
Item {
|
||||||
color: Theme.palette.primaryColor1
|
// Encapsulated into the item to not resize the icon
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
|
StatusComboboxIndicator {
|
||||||
|
id: comboboxIndicator
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
color: Theme.palette.primaryColor1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -337,6 +337,7 @@ StatusDialog {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 8
|
spacing: 8
|
||||||
Layout.preferredHeight: 44
|
Layout.preferredHeight: 44
|
||||||
|
Layout.maximumWidth: parent.width
|
||||||
|
|
||||||
HeaderTitleText {
|
HeaderTitleText {
|
||||||
id: modalHeader
|
id: modalHeader
|
||||||
|
@ -354,6 +355,7 @@ StatusDialog {
|
||||||
assetsModel: assetsAdaptor.outputAssetsModel
|
assetsModel: assetsAdaptor.outputAssetsModel
|
||||||
collectiblesModel: collectiblesAdaptorLoader.active
|
collectiblesModel: collectiblesAdaptorLoader.active
|
||||||
? collectiblesAdaptorLoader.item.model : null
|
? collectiblesAdaptorLoader.item.model : null
|
||||||
|
Layout.fillWidth: isTokenSelected
|
||||||
|
|
||||||
TokenSelectorViewAdaptor {
|
TokenSelectorViewAdaptor {
|
||||||
id: assetsAdaptor
|
id: assetsAdaptor
|
||||||
|
|
Loading…
Reference in New Issue