From f82a4db82616f53fd3b3fa9865afd54454582a02 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Fri, 20 Jun 2025 19:24:55 +0200 Subject: [PATCH] Wrap text in action button in room info --- Linphone/view/Control/Button/LabelButton.qml | 2 ++ .../Layout/Chat/GroupConversationInfos.qml | 28 ++++++++++++++----- .../Layout/Chat/OneOneConversationInfos.qml | 28 ++++++++++++++----- 3 files changed, 44 insertions(+), 14 deletions(-) diff --git a/Linphone/view/Control/Button/LabelButton.qml b/Linphone/view/Control/Button/LabelButton.qml index e44dd183e..544303662 100644 --- a/Linphone/view/Control/Button/LabelButton.qml +++ b/Linphone/view/Control/Button/LabelButton.qml @@ -9,6 +9,7 @@ ColumnLayout { id: labelButton // property alias image: buttonImg property alias button: button + property alias text: text property string label spacing: Math.round(8 * DefaultStyle.dp) Button { @@ -25,6 +26,7 @@ ColumnLayout { style: ButtonStyle.grey } Text { + id: text Layout.alignment: Qt.AlignHCenter text: labelButton.label font { diff --git a/Linphone/view/Page/Layout/Chat/GroupConversationInfos.qml b/Linphone/view/Page/Layout/Chat/GroupConversationInfos.qml index b582a1721..409a6523e 100644 --- a/Linphone/view/Page/Layout/Chat/GroupConversationInfos.qml +++ b/Linphone/view/Page/Layout/Chat/GroupConversationInfos.qml @@ -106,12 +106,18 @@ ColumnLayout { } RowLayout { - spacing: Math.round(55 * DefaultStyle.dp) + spacing: Math.round(10 * DefaultStyle.dp) Layout.alignment: Qt.AlignHCenter Layout.topMargin: Math.round(30 * DefaultStyle.dp) + Layout.preferredHeight: Math.round(100 * DefaultStyle.dp) + Layout.minimumHeight: Math.round(100 * DefaultStyle.dp) LabelButton { - width: Math.round(56 * DefaultStyle.dp) - height: Math.round(56 * DefaultStyle.dp) + text.Layout.fillWidth: true + text.horizontalAlignment: Text.AlignHCenter + text.wrapMode: Text.Wrap + Layout.alignment: Qt.AlignTop + Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) + Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) button.icon.width: Math.round(24 * DefaultStyle.dp) button.icon.height: Math.round(24 * DefaultStyle.dp) button.icon.source: chatCore.muted ? AppIcons.bell : AppIcons.bellSlash @@ -121,8 +127,12 @@ ColumnLayout { } LabelButton { visible: !SettingsCpp.disableMeetingsFeature - width: Math.round(56 * DefaultStyle.dp) - height: Math.round(56 * DefaultStyle.dp) + text.Layout.fillWidth: true + text.horizontalAlignment: Text.AlignHCenter + text.wrapMode: Text.Wrap + Layout.alignment: Qt.AlignTop + Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) + Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) button.icon.width: Math.round(24 * DefaultStyle.dp) button.icon.height: Math.round(24 * DefaultStyle.dp) button.icon.source: AppIcons.phone @@ -132,8 +142,12 @@ ColumnLayout { } LabelButton { visible: !SettingsCpp.disableMeetingsFeature - width: Math.round(56 * DefaultStyle.dp) - height: Math.round(56 * DefaultStyle.dp) + text.Layout.fillWidth: true + text.horizontalAlignment: Text.AlignHCenter + text.wrapMode: Text.Wrap + Layout.alignment: Qt.AlignTop + Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) + Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) button.icon.width: Math.round(24 * DefaultStyle.dp) button.icon.height: Math.round(24 * DefaultStyle.dp) button.icon.source: AppIcons.videoconference diff --git a/Linphone/view/Page/Layout/Chat/OneOneConversationInfos.qml b/Linphone/view/Page/Layout/Chat/OneOneConversationInfos.qml index 9b35fc65f..7dcb05b87 100644 --- a/Linphone/view/Page/Layout/Chat/OneOneConversationInfos.qml +++ b/Linphone/view/Page/Layout/Chat/OneOneConversationInfos.qml @@ -51,12 +51,18 @@ ColumnLayout { } RowLayout { - spacing: Math.round(55 * DefaultStyle.dp) + spacing: Math.round(10 * DefaultStyle.dp) Layout.alignment: Qt.AlignHCenter Layout.topMargin: Math.round(30 * DefaultStyle.dp) + Layout.preferredHeight: Math.round(110 * DefaultStyle.dp) + Layout.minimumHeight: Math.round(110 * DefaultStyle.dp) LabelButton { - width: Math.round(56 * DefaultStyle.dp) - height: Math.round(56 * DefaultStyle.dp) + text.Layout.fillWidth: true + text.horizontalAlignment: Text.AlignHCenter + text.wrapMode: Text.Wrap + Layout.alignment: Qt.AlignTop + Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) + Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) button.icon.width: Math.round(24 * DefaultStyle.dp) button.icon.height: Math.round(24 * DefaultStyle.dp) button.icon.source: AppIcons.phone @@ -65,8 +71,12 @@ ColumnLayout { button.onClicked: parentView.oneOneCall(false) } LabelButton { - width: Math.round(56 * DefaultStyle.dp) - height: Math.round(56 * DefaultStyle.dp) + text.Layout.fillWidth: true + text.horizontalAlignment: Text.AlignHCenter + text.wrapMode: Text.Wrap + Layout.alignment: Qt.AlignTop + Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) + Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) button.icon.width: Math.round(24 * DefaultStyle.dp) button.icon.height: Math.round(24 * DefaultStyle.dp) button.icon.source: mainItem.chatCore.muted ? AppIcons.bell : AppIcons.bellSlash @@ -77,8 +87,12 @@ ColumnLayout { } } LabelButton { - width: Math.round(56 * DefaultStyle.dp) - height: Math.round(56 * DefaultStyle.dp) + text.Layout.fillWidth: true + text.horizontalAlignment: Text.AlignHCenter + text.wrapMode: Text.Wrap + Layout.alignment: Qt.AlignTop + Layout.preferredWidth: Math.round(130 * DefaultStyle.dp) + Layout.maximumWidth: Math.round(130 * DefaultStyle.dp) button.icon.width: Math.round(24 * DefaultStyle.dp) button.icon.height: Math.round(24 * DefaultStyle.dp) button.icon.source: AppIcons.search