From e3aebd3c00c9a2852812dd13fefff3b29ef5a388 Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Tue, 2 Sep 2025 11:26:55 +0200 Subject: [PATCH] add today button meeting list #LINQT-1886 --- Linphone/data/image/calendar.svg | 1 + .../Control/Display/Chat/ChatListView.qml | 2 +- .../Display/Meeting/MeetingListView.qml | 8 +++- .../Settings/AccountSettingsGeneralLayout.qml | 2 +- .../view/Page/Main/Meeting/MeetingPage.qml | 45 ++++++++++++------- Linphone/view/Style/AppIcons.qml | 3 +- 6 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 Linphone/data/image/calendar.svg diff --git a/Linphone/data/image/calendar.svg b/Linphone/data/image/calendar.svg new file mode 100644 index 000000000..c066f4a4b --- /dev/null +++ b/Linphone/data/image/calendar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/view/Control/Display/Chat/ChatListView.qml b/Linphone/view/Control/Display/Chat/ChatListView.qml index 52a36b65b..73c6438fa 100644 --- a/Linphone/view/Control/Display/Chat/ChatListView.qml +++ b/Linphone/view/Control/Display/Chat/ChatListView.qml @@ -245,7 +245,7 @@ ListView { EffectImage { visible: modelData != undefined && modelData.core.lastMessage && modelData.core.lastMessage.core.isCalendarInvite && !remoteComposingInfo.visible fillMode: Image.PreserveAspectFit - imageSource: AppIcons.calendar + imageSource: AppIcons.calendarBlank colorizationColor: DefaultStyle.main2_500 Layout.preferredHeight: Math.round(14 * DefaultStyle.dp) Layout.preferredWidth: Math.round(14 * DefaultStyle.dp) diff --git a/Linphone/view/Control/Display/Meeting/MeetingListView.qml b/Linphone/view/Control/Display/Meeting/MeetingListView.qml index a17b23526..c594d4818 100644 --- a/Linphone/view/Control/Display/Meeting/MeetingListView.qml +++ b/Linphone/view/Control/Display/Meeting/MeetingListView.qml @@ -33,10 +33,16 @@ ListView { mainItem.selectedConference = null mainItem.currentIndex = -1 } + + function scrollToCurrentDate() { + currentIndex = -1 + confInfoProxy.selectData(confInfoProxy.getCurrentDateConfInfo()) + moveToCurrentItem() + } //---------------------------------------------------------------- function moveToCurrentItem(){ - if( mainItem.currentIndex >= 0) + if(mainItem.currentIndex >= 0) mainItem.positionViewAtIndex(mainItem.currentIndex, ListView.Contain) } onCurrentItemChanged: { diff --git a/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml b/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml index 86b596464..bb5ad5fe3 100644 --- a/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml +++ b/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml @@ -331,7 +331,7 @@ AbstractSettingsLayout { EffectImage { Layout.preferredWidth: Math.round(20 * DefaultStyle.dp) Layout.preferredHeight: Math.round(20 * DefaultStyle.dp) - imageSource: AppIcons.calendar + imageSource: AppIcons.calendarBlank colorizationColor: DefaultStyle.main2_600 fillMode: Image.PreserveAspectFit } diff --git a/Linphone/view/Page/Main/Meeting/MeetingPage.qml b/Linphone/view/Page/Main/Meeting/MeetingPage.qml index 09fce2209..008f636ee 100644 --- a/Linphone/view/Page/Main/Meeting/MeetingPage.qml +++ b/Linphone/view/Page/Main/Meeting/MeetingPage.qml @@ -184,32 +184,47 @@ AbstractMainPage { } Item{Layout.fillWidth: true} Button { + id: newConfButton style: ButtonStyle.noBackground icon.source: AppIcons.plusCircle Layout.preferredWidth: Math.round(28 * DefaultStyle.dp) Layout.preferredHeight: Math.round(28 * DefaultStyle.dp) icon.width: Math.round(28 * DefaultStyle.dp) icon.height: Math.round(28 * DefaultStyle.dp) + KeyNavigation.down: scrollToCurrentDateButton onClicked: { mainItem.editConference() } } } - SearchBar { - id: searchBar - Layout.fillWidth: true - Layout.topMargin: Math.round(18 * DefaultStyle.dp) - Layout.rightMargin: Math.round(38 * DefaultStyle.dp) - //: "Rechercher une réunion" - placeholderText: qsTr("meetings_search_hint") - KeyNavigation.up: conferenceList - KeyNavigation.down: conferenceList - visible: conferenceList.count !== 0 || text.length !== 0 - Binding { - target: mainItem - property: "showDefaultItem" - when: searchBar.text.length !== 0 - value: false + RowLayout { + id: scrollToCurrentDateButton + visible: conŒferenceList.count !== 0 || text.length !== 0 + spacing: Math.round(11 * DefaultStyle.dp) + Layout.topMargin: Math.round(18 * DefaultStyle.dp) + Layout.rightMargin: Math.round(38 * DefaultStyle.dp) + KeyNavigation.up: newConfButton + KeyNavigation.down: searchBar + Button { + Layout.preferredWidth: Math.round(32 * DefaultStyle.dp) + Layout.preferredHeight: Math.round(32 * DefaultStyle.dp) + icon.source: AppIcons.calendar + style: ButtonStyle.noBackground + onClicked: conferenceList.scrollToCurrentDate() + } + SearchBar { + id: searchBar + Layout.fillWidth: true + //: "Rechercher une réunion" + placeholderText: qsTr("meetings_search_hint") + KeyNavigation.up: scrollToCurrentDateButton + KeyNavigation.down: conferenceList + Binding { + target: mainItem + property: "showDefaultItem" + when: searchBar.text.length !== 0 + value: false + } } } Text { diff --git a/Linphone/view/Style/AppIcons.qml b/Linphone/view/Style/AppIcons.qml index 88f1e5b9e..e38e92201 100644 --- a/Linphone/view/Style/AppIcons.qml +++ b/Linphone/view/Style/AppIcons.qml @@ -129,7 +129,8 @@ QtObject { property string cellSignalNone: "image://internal/cell-signal-none.svg" property string mobile: "image://internal/device-mobile-camera.svg" property string desktop: "image://internal/desktop.svg" - property string calendar: "image://internal/calendar-blank.svg" + property string calendarBlank: "image://internal/calendar-blank.svg" + property string calendar: "image://internal/calendar.svg" property string bell: "image://internal/bell.svg" property string bellSlash: "image://internal/bell-slash.svg" property string bellDnd: "image://internal/bell-dnd.svg"