fix contact edition fields

try to remove avatar shadow effect in lists to improve performances
This commit is contained in:
Gaelle Braud 2025-02-10 16:25:24 +01:00 committed by gaelle
parent 38a718ca0a
commit 5144df7896
10 changed files with 17 additions and 6 deletions

View file

@ -122,6 +122,7 @@ ListView {
width: 45 * DefaultStyle.dp width: 45 * DefaultStyle.dp
height: 45 * DefaultStyle.dp height: 45 * DefaultStyle.dp
isConference: modelData.core.isConference isConference: modelData.core.isConference
shadowEnabled: false
} }
ColumnLayout { ColumnLayout {
Layout.fillHeight: true Layout.fillHeight: true

View file

@ -33,6 +33,7 @@ ListView {
Layout.preferredHeight: 45 * DefaultStyle.dp Layout.preferredHeight: 45 * DefaultStyle.dp
_address: modelData.core.remoteAddress _address: modelData.core.remoteAddress
isConference: modelData.core.isConference isConference: modelData.core.isConference
shadowEnabled: false
} }
ColumnLayout { ColumnLayout {
spacing: 0 spacing: 0

View file

@ -16,6 +16,7 @@ Loader{
property FriendGui contact: null property FriendGui contact: null
property CallGui call: null property CallGui call: null
property bool isConference: false property bool isConference: false
property bool shadowEnabled: true
property string _address: account property string _address: account
? account.core?.identityAddress || "" ? account.core?.identityAddress || ""
: call : call
@ -65,9 +66,11 @@ Loader{
anchors.fill: parent anchors.fill: parent
MultiEffect { MultiEffect {
source: stackView visible: mainItem.shadowEnabled
enabled: mainItem.shadowEnabled
shadowEnabled: mainItem.shadowEnabled
anchors.fill: stackView anchors.fill: stackView
shadowEnabled: true source: stackView
shadowBlur: 0.1 shadowBlur: 0.1
shadowColor: DefaultStyle.grey_1000 shadowColor: DefaultStyle.grey_1000
shadowOpacity: 0.1 shadowOpacity: 0.1

View file

@ -67,6 +67,7 @@ FocusScope {
Layout.preferredHeight: 45 * DefaultStyle.dp Layout.preferredHeight: 45 * DefaultStyle.dp
Layout.leftMargin: 5 * DefaultStyle.dp Layout.leftMargin: 5 * DefaultStyle.dp
contact: searchResultItem contact: searchResultItem
shadowEnabled: false
} }
ColumnLayout { ColumnLayout {
spacing: 0 spacing: 0

View file

@ -47,6 +47,7 @@ ListView {
Layout.preferredWidth: 45 * DefaultStyle.dp Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp Layout.preferredHeight: 45 * DefaultStyle.dp
_address: modelData.core.address _address: modelData.core.address
shadowEnabled: false
} }
Text { Text {
text: modelData.core.displayName text: modelData.core.displayName

View file

@ -52,6 +52,7 @@ ListView {
Layout.preferredWidth: 45 * DefaultStyle.dp Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp Layout.preferredHeight: 45 * DefaultStyle.dp
_address: modelData.core.sipAddress _address: modelData.core.sipAddress
shadowEnabled: false
} }
Text { Text {
text: modelData.core.displayName text: modelData.core.displayName

View file

@ -197,7 +197,7 @@ MainRightPanel {
id: givenNameEdit id: givenNameEdit
Layout.preferredHeight: 49 * DefaultStyle.dp Layout.preferredHeight: 49 * DefaultStyle.dp
initialText: contact.core.givenName initialText: contact.core.givenName
onTextChanged: { onTextEdited: {
contact.core.givenName = givenNameEdit.text contact.core.givenName = givenNameEdit.text
} }
backgroundColor: DefaultStyle.grey_0 backgroundColor: DefaultStyle.grey_0
@ -212,7 +212,7 @@ MainRightPanel {
contentItem: TextField { contentItem: TextField {
id: nameTextField id: nameTextField
initialText: contact.core.familyName initialText: contact.core.familyName
onEditingFinished: contact.core.familyName = text onTextEdited: contact.core.familyName = text
backgroundColor: DefaultStyle.grey_0 backgroundColor: DefaultStyle.grey_0
KeyNavigation.up: givenNameEdit KeyNavigation.up: givenNameEdit
KeyNavigation.down: companyTextField KeyNavigation.down: companyTextField
@ -224,7 +224,7 @@ MainRightPanel {
contentItem: TextField { contentItem: TextField {
id: companyTextField id: companyTextField
initialText: contact.core.organization initialText: contact.core.organization
onEditingFinished: contact.core.organization = text onTextEdited: contact.core.organization = text
backgroundColor: DefaultStyle.grey_0 backgroundColor: DefaultStyle.grey_0
KeyNavigation.up: nameTextField KeyNavigation.up: nameTextField
KeyNavigation.down: jobTextField KeyNavigation.down: jobTextField
@ -236,7 +236,7 @@ MainRightPanel {
contentItem: TextField { contentItem: TextField {
id: jobTextField id: jobTextField
initialText: contact.core.job initialText: contact.core.job
onEditingFinished: contact.core.job = text onTextEdited: contact.core.job = text
backgroundColor: DefaultStyle.grey_0 backgroundColor: DefaultStyle.grey_0
KeyNavigation.up: companyTextField KeyNavigation.up: companyTextField
Keys.onPressed: (event) => { Keys.onPressed: (event) => {

View file

@ -49,6 +49,7 @@ FocusScope{
Layout.preferredWidth: 45 * DefaultStyle.dp Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp Layout.preferredHeight: 45 * DefaultStyle.dp
_address: modelData _address: modelData
shadowEnabled: false
} }
Text { Text {
Layout.fillWidth: true Layout.fillWidth: true

View file

@ -283,6 +283,7 @@ FocusScope {
Layout.preferredWidth: 45 * DefaultStyle.dp Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp Layout.preferredHeight: 45 * DefaultStyle.dp
_address: modelData.address _address: modelData.address
shadowEnabled: false
} }
Text { Text {
property var displayNameObj: UtilsCpp.getDisplayName(modelData.address) property var displayNameObj: UtilsCpp.getDisplayName(modelData.address)

View file

@ -765,6 +765,7 @@ AbstractMainPage {
Layout.preferredWidth: 45 * DefaultStyle.dp Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp Layout.preferredHeight: 45 * DefaultStyle.dp
_address: modelData.address _address: modelData.address
shadowEnabled: false
} }
Text { Text {
property var displayNameObj: UtilsCpp.getDisplayName(modelData.address) property var displayNameObj: UtilsCpp.getDisplayName(modelData.address)