fix(ProfileDialogView): wrap bio in a scroll view
- also trim the leading/trailing whitespace - fixes long bio (mainly due to linebreaks) pushing down everything below and also overflowing the preview - adjust SB page to include such example bio Fixes #14463 Fixes #14465
This commit is contained in:
parent
6930cc49a7
commit
eae2489254
|
@ -93,17 +93,6 @@ SplitView {
|
||||||
incomingVerificationStatus: ctrlIncomingVerificationStatus.currentValue,
|
incomingVerificationStatus: ctrlIncomingVerificationStatus.currentValue,
|
||||||
contactRequestState: ctrlContactRequestState.currentValue,
|
contactRequestState: ctrlContactRequestState.currentValue,
|
||||||
bio: bio.text,
|
bio: bio.text,
|
||||||
socialLinks: JSON.stringify
|
|
||||||
([{
|
|
||||||
text: "__twitter",
|
|
||||||
url: "https://twitter.com/ethstatus",
|
|
||||||
icon: "twitter"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "__github",
|
|
||||||
url: "https://github.com/status-im",
|
|
||||||
icon: "github"
|
|
||||||
}]),
|
|
||||||
onlineStatus: ctrlOnlineStatus.currentValue
|
onlineStatus: ctrlOnlineStatus.currentValue
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -639,11 +628,20 @@ SplitView {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
id: bio
|
id: bio
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
text: "Hi, I am Alex. I'm an indie developer who mainly works on web products.
|
text: "
|
||||||
|
|
||||||
|
|
||||||
|
Hi, I am Alex. I'm an indie developer who mainly works on web products.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
I worked for several different companies and created a couple of my own products from scratch. Currently building Telescope and Prepacked.
|
I worked for several different companies and created a couple of my own products from scratch. Currently building Telescope and Prepacked.
|
||||||
|
|
||||||
Say hi, or find me on Twitter, GitHub, or Mastodon."
|
Say hi, or find me on Twitter, GitHub, or Mastodon.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -464,6 +464,7 @@ Pane {
|
||||||
enabled: d.contactDetails.trustStatus === Constants.trustStatus.untrustworthy && !d.isBlocked
|
enabled: d.contactDetails.trustStatus === Constants.trustStatus.untrustworthy && !d.isBlocked
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
root.contactsStore.removeTrustStatus(root.publicKey)
|
root.contactsStore.removeTrustStatus(root.publicKey)
|
||||||
|
d.reload()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StatusAction {
|
StatusAction {
|
||||||
|
@ -556,12 +557,21 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StatusBaseText {
|
StatusScrollView {
|
||||||
|
id: bioScrollView
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 116
|
||||||
|
contentWidth: availableWidth
|
||||||
Layout.topMargin: Style.current.halfPadding
|
Layout.topMargin: Style.current.halfPadding
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
padding: 0
|
||||||
text: root.dirty ? root.dirtyValues.bio : d.contactDetails.bio
|
rightPadding: Style.current.padding
|
||||||
visible: !!text
|
visible: !!bioText.text
|
||||||
|
StatusBaseText {
|
||||||
|
id: bioText
|
||||||
|
width: bioScrollView.availableWidth
|
||||||
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
|
text: root.dirty ? root.dirtyValues.bio.trim() : d.contactDetails.bio.trim()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
EmojiHash {
|
EmojiHash {
|
||||||
Layout.topMargin: Style.current.halfPadding
|
Layout.topMargin: Style.current.halfPadding
|
||||||
|
|
Loading…
Reference in New Issue