From 2feb741c1b68f16f95e26885b4b5f38644e2aa1e Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Thu, 17 Apr 2025 17:05:19 +0200 Subject: [PATCH] force larger text metrics weight to guarantee correct width for button fix macos ci + update sdk --- Linphone/data/languages/en.ts | 2 +- Linphone/data/languages/fr_FR.ts | 4 ++-- .../view/Control/Button/IconLabelButton.qml | 17 ++++++++++++----- .../Control/Display/Contact/ContactListItem.qml | 3 +++ Linphone/view/Page/Main/Contact/ContactPage.qml | 1 - 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index 3ffc98f5a..72250c9b3 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -1220,7 +1220,7 @@ call_paused_by_remote Call paused by remote - Call paused by remote + Call paused by remote diff --git a/Linphone/data/languages/fr_FR.ts b/Linphone/data/languages/fr_FR.ts index 816f0617d..00c2de558 100644 --- a/Linphone/data/languages/fr_FR.ts +++ b/Linphone/data/languages/fr_FR.ts @@ -1024,7 +1024,7 @@ sip_address_copied_to_clipboard_message L'adresse a été copié dans le presse_papiers - L'adresse a été copié dans le presse_papiers + L'adresse a été copié dans le presse-papiers @@ -1220,7 +1220,7 @@ call_paused_by_remote Call paused by remote - Appel mis en pause par votre correspondant + Appel mis en pause par votre correspondant diff --git a/Linphone/view/Control/Button/IconLabelButton.qml b/Linphone/view/Control/Button/IconLabelButton.qml index dce064255..520928dee 100644 --- a/Linphone/view/Control/Button/IconLabelButton.qml +++ b/Linphone/view/Control/Button/IconLabelButton.qml @@ -47,12 +47,19 @@ Button { family: DefaultStyle.defaultFont capitalization: mainItem.capitalization underline: mainItem.underline - bold: mainItem.style === ButtonStyle.noBackground && (mainItem.hovered || mainItem.pressed) + bold: (mainItem.style === ButtonStyle.noBackground || mainItem.style === ButtonStyle.noBackgroundRed) && (mainItem.hovered || mainItem.pressed) } - TextMetrics { - id: textMetrics - text: mainItem.text - font: textItem.font + } + TextMetrics { + id: textMetrics + text: mainItem.text + font { + pixelSize: mainItem.textSize + weight: mainItem.textWeight * 2 + family: DefaultStyle.defaultFont + capitalization: mainItem.capitalization + underline: mainItem.underline + bold: true } } Item {Layout.fillWidth: true} diff --git a/Linphone/view/Control/Display/Contact/ContactListItem.qml b/Linphone/view/Control/Display/Contact/ContactListItem.qml index b98bbc7ab..73626327f 100644 --- a/Linphone/view/Control/Display/Contact/ContactListItem.qml +++ b/Linphone/view/Control/Display/Contact/ContactListItem.qml @@ -182,6 +182,7 @@ FocusScope { popup.contentItem: ColumnLayout { IconLabelButton { + Layout.fillWidth: true visible: searchResultItem.core.isStored && !searchResultItem.core.readOnly //: "Enlever des favoris" @@ -202,6 +203,7 @@ FocusScope { } IconLabelButton { text: qsTr("Partager") + Layout.fillWidth: true icon.source: AppIcons.shareNetwork spacing: Math.round(10 * DefaultStyle.dp) textColor: DefaultStyle.main2_500main @@ -233,6 +235,7 @@ FocusScope { icon.source: AppIcons.trashCan spacing: Math.round(10 * DefaultStyle.dp) visible: !searchResultItem.core.readOnly + Layout.fillWidth: true onClicked: { mainItem.contactDeletionRequested( searchResultItem) diff --git a/Linphone/view/Page/Main/Contact/ContactPage.qml b/Linphone/view/Page/Main/Contact/ContactPage.qml index 0809a4c31..73c580597 100644 --- a/Linphone/view/Page/Main/Contact/ContactPage.qml +++ b/Linphone/view/Page/Main/Contact/ContactPage.qml @@ -754,7 +754,6 @@ FriendGui{ //: "Autres actions" label: qsTr("contact_details_actions_title") content: ColumnLayout { - width: parent.width IconLabelButton { Layout.fillWidth: true Layout.preferredHeight: Math.round(50 * DefaultStyle.dp)