fix SendContactRequestModal (missing) margins/padding

This commit is contained in:
Lukáš Tinkl 2023-08-01 14:30:44 +02:00 committed by Lukáš Tinkl
parent 403e85ded7
commit 3b560157be
1 changed files with 35 additions and 39 deletions

View File

@ -16,6 +16,7 @@ StatusModal {
property var contactsStore property var contactsStore
headerSettings.title: qsTr("Send Contact Request to chat key") headerSettings.title: qsTr("Send Contact Request to chat key")
padding: d.contentMargins
QtObject { QtObject {
id: d id: d
@ -104,52 +105,47 @@ StatusModal {
} }
} }
contentItem: Item { contentItem: Column {
Column { id: content
id: content spacing: d.contentSpacing
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: d.contentMargins
spacing: d.contentSpacing
StatusInput { StatusInput {
id: chatKeyInput id: chatKeyInput
input.edit.objectName: "SendContactRequestModal_ChatKey_Input" input.edit.objectName: "SendContactRequestModal_ChatKey_Input"
placeholderText: qsTr("Enter chat key here") placeholderText: qsTr("Enter chat key here")
input.text: input.edit.focus? d.realChatKey : d.elidedChatKey input.text: input.edit.focus? d.realChatKey : d.elidedChatKey
input.rightComponent: { input.rightComponent: {
if(d.showPasteButton) if(d.showPasteButton)
return pasteButtonComponent return pasteButtonComponent
else if(d.showChatKeyValidationIndicator) else if(d.showChatKeyValidationIndicator)
return chatKeyValidationIndicator return chatKeyValidationIndicator
else else
return null return null
} }
input.onTextChanged: { input.onTextChanged: {
if(input.edit.focus) if(input.edit.focus)
{ {
d.textChanged(text) d.textChanged(text)
}
} }
} }
}
StatusInput { StatusInput {
id: messageInput id: messageInput
input.edit.objectName: "SendContactRequestModal_SayWhoYouAre_Input" input.edit.objectName: "SendContactRequestModal_SayWhoYouAre_Input"
charLimit: d.maxMsgLength charLimit: d.maxMsgLength
placeholderText: qsTr("Say who you are / why you want to become a contact...") placeholderText: qsTr("Say who you are / why you want to become a contact...")
input.multiline: true input.multiline: true
minimumHeight: d.msgHeight minimumHeight: d.msgHeight
maximumHeight: d.msgHeight maximumHeight: d.msgHeight
input.verticalAlignment: TextEdit.AlignTop input.verticalAlignment: TextEdit.AlignTop
validators: [StatusMinLengthValidator { validators: [StatusMinLengthValidator {
minLength: d.minMsgLength minLength: d.minMsgLength
errorMessage: Utils.getErrorMessage(messageInput.errors, qsTr("who are you")) errorMessage: Utils.getErrorMessage(messageInput.errors, qsTr("who are you"))
}] }]
}
} }
} }