diff --git a/Linphone/core/conference/ConferenceInfoList.cpp b/Linphone/core/conference/ConferenceInfoList.cpp index ac0c92abf..4f56e2876 100644 --- a/Linphone/core/conference/ConferenceInfoList.cpp +++ b/Linphone/core/conference/ConferenceInfoList.cpp @@ -58,7 +58,7 @@ void ConferenceInfoList::setSelf(QSharedPointer me) { auto defaultAccount = CoreModel::getInstance()->getCore()->getDefaultAccount(); if (!defaultAccount) return; std::list> conferenceInfos = - defaultAccount->getConferenceInformationList(); + defaultAccount->getConferenceInformationList(); items->push_back(nullptr); // Add Dummy conference for today for (auto conferenceInfo : conferenceInfos) { auto confInfoCore = build(conferenceInfo); @@ -102,15 +102,11 @@ void ConferenceInfoList::setSelf(QSharedPointer me) { emit lUpdate(); } }); - mCoreModelConnection->makeConnectToModel( - &CoreModel::callCreated, [this](const std::shared_ptr &call) { - lDebug() << "call created" << Utils::coreStringToAppString(call->getRemoteAddress()->asString()); - }); mCoreModelConnection->makeConnectToModel( &CoreModel::conferenceInfoReceived, [this](const std::shared_ptr &core, const std::shared_ptr &conferenceInfo) { - lDebug() << "info received" << conferenceInfo->getOrganizer()->asStringUriOnly() + lDebug() << log().arg("conference info received") << conferenceInfo->getOrganizer()->asStringUriOnly() << conferenceInfo->getSubject(); }); emit lUpdate(); diff --git a/Linphone/tool/Utils.cpp b/Linphone/tool/Utils.cpp index 9ef299038..2b3010c71 100644 --- a/Linphone/tool/Utils.cpp +++ b/Linphone/tool/Utils.cpp @@ -140,7 +140,11 @@ void Utils::setupConference(ConferenceInfoGui *confGui) { } void Utils::openCallsWindow(CallGui *call) { - if (call) App::getInstance()->getCallsWindow(QVariant::fromValue(call))->show(); + if (call) { + auto window = App::getInstance()->getCallsWindow(QVariant::fromValue(call)); + window->show(); + window->raise(); + } } QQuickWindow *Utils::getCallsWindow(CallGui *callGui) { diff --git a/Linphone/view/App/Layout/MainLayout.qml b/Linphone/view/App/Layout/MainLayout.qml index 107c128bf..9c54fbe5e 100644 --- a/Linphone/view/App/Layout/MainLayout.qml +++ b/Linphone/view/App/Layout/MainLayout.qml @@ -69,15 +69,37 @@ Item { id: accountProxy onDefaultAccountChanged: if (tabbar.currentIndex === 0 && defaultAccount) defaultAccount.core.lResetMissedCalls() } - - Timer { - id: autoClosePopup - interval: 5000 - onTriggered: { - transferSucceedPopup.close() - } + CallProxy { + id: callsModel } + + Item{ + Popup { + id: currentCallNotif + background: Item{} + closePolicy: Control.Popup.NoAutoClose + visible: currentCall + && currentCall.core.state != LinphoneEnums.CallState.Idle + && currentCall.core.state != LinphoneEnums.CallState.IncomingReceived + && currentCall.core.state != LinphoneEnums.CallState.PushIncomingReceived + x: mainItem.width/2 - width/2 + y: contentItem.height/2 + property var currentCall: callsModel.currentCall ? callsModel.currentCall : null + property var peerNameObj: currentCall ? UtilsCpp.getDisplayName(currentCall.core.peerAddress) : null + property string peerName:peerNameObj ? peerNameObj.value : "" + contentItem: Button { + text: currentCallNotif.currentCall + ? currentCallNotif.currentCall.core.conference + ? ("Réunion en cours : ") + currentCallNotif.currentCall.core.conference.core.subject + : (("Appel en cours : ") + currentCallNotif.peerName) : "appel en cours" + color: DefaultStyle.success_500main + onClicked: { + var callsWindow = UtilsCpp.getCallsWindow(currentCallNotif.currentCall) + UtilsCpp.smartShowWindow(callsWindow) + } + } + } anchors.fill: parent ColumnLayout{ anchors.fill: parent diff --git a/Linphone/view/CMakeLists.txt b/Linphone/view/CMakeLists.txt index 37d372b31..9801ddbc0 100644 --- a/Linphone/view/CMakeLists.txt +++ b/Linphone/view/CMakeLists.txt @@ -39,6 +39,7 @@ list(APPEND _LINPHONEAPP_QML_FILES view/Item/Notification/Notification.qml view/Item/Notification/NotificationReceivedCall.qml + view/Item/Notification/TemporaryNotification.qml view/Item/Participant/ParticipantDeviceListView.qml view/Item/Participant/ParticipantListView.qml diff --git a/Linphone/view/Item/Button.qml b/Linphone/view/Item/Button.qml index 35e0f2ad4..0d7684215 100644 --- a/Linphone/view/Item/Button.qml +++ b/Linphone/view/Item/Button.qml @@ -8,9 +8,9 @@ Control.Button { id: mainItem property int capitalization property color color: DefaultStyle.main1_500_main - property color disabledColor: DefaultStyle.main1_500_main_darker - property color borderColor: "transparent" - property color pressedColor: DefaultStyle.main1_500_main_darker + property color disabledColor: Qt.darker(color, 1.5) + property color borderColor: DefaultStyle.grey_0 + readonly property color pressedColor: Qt.darker(color, 1.1) property bool inversedColors: false property int textSize: 18 * DefaultStyle.dp property int textWeight: 600 * DefaultStyle.dp diff --git a/Linphone/view/Item/Calendar.qml b/Linphone/view/Item/Calendar.qml index 95db3a624..f5377f214 100644 --- a/Linphone/view/Item/Calendar.qml +++ b/Linphone/view/Item/Calendar.qml @@ -149,7 +149,6 @@ ListView { height: 30 * DefaultStyle.dp radius: 50 * DefaultStyle.dp color: isSelectedDay ? DefaultStyle.main1_500_main : "transparent" - border.color: DefaultStyle.main1_500_main_darker border.width: focusDay.activeFocus || hoveringArea.containsMouse ? 1 : 0 } diff --git a/Linphone/view/Item/IconLabelButton.qml b/Linphone/view/Item/IconLabelButton.qml index a6760cebb..0a1a6c2a0 100644 --- a/Linphone/view/Item/IconLabelButton.qml +++ b/Linphone/view/Item/IconLabelButton.qml @@ -12,7 +12,7 @@ Item{ property int textSize: 14 * DefaultStyle.dp property int textWeight: 400 * DefaultStyle.dp property color backgroundColor: DefaultStyle.grey_0 - property color backgroundPressedColor: DefaultStyle.main2_100 + readonly property color backgroundPressedColor: Qt.darker(backgroundColor, 1.1) property int radius: 5 * DefaultStyle.dp property bool shadowEnabled: mainItem.activeFocus// || containsMouse property alias containsMouse: mouseArea.containsMouse diff --git a/Linphone/view/Item/Notification/NotificationReceivedCall.qml b/Linphone/view/Item/Notification/NotificationReceivedCall.qml index 3eb6aa19d..efc46ba35 100644 --- a/Linphone/view/Item/Notification/NotificationReceivedCall.qml +++ b/Linphone/view/Item/Notification/NotificationReceivedCall.qml @@ -80,7 +80,6 @@ Notification { spacing: 26 * DefaultStyle.dp Button { color: DefaultStyle.success_500main - pressedColor: DefaultStyle.success_500main_darker Layout.preferredWidth: 75 * DefaultStyle.dp Layout.preferredHeight: 55 * DefaultStyle.dp contentItem: EffectImage { diff --git a/Linphone/view/Item/Notification/TemporaryNotification.qml b/Linphone/view/Item/Notification/TemporaryNotification.qml new file mode 100644 index 000000000..a4c9451f0 --- /dev/null +++ b/Linphone/view/Item/Notification/TemporaryNotification.qml @@ -0,0 +1,65 @@ +import QtQuick 2.7 +import QtQuick.Effects +import Linphone + +Control.Control { + id: mainItem + // width: 269 * DefaultStyle.dp + y: -height + z: 1 + topPadding: 8 * DefaultStyle.dp + bottomPadding: 8 * DefaultStyle.dp + leftPadding: 37 * DefaultStyle.dp + rightPadding: 37 * DefaultStyle.dp + anchors.horizontalCenter: parent.horizontalCenter + clip: true + + property string text + property string imageSource + property color contentColor + property int yCoord + + signal clicked() + + function open() { + y = mainItem.yCoord + autoCloseNotification.restart() + } + MouseArea { + anchors.fill: parent + onClicked: mainItem.clicked() + } + Timer { + id: autoCloseNotification + interval: 4000 + onTriggered: { + mainItem.y = -mainItem.height + } + } + Behavior on y {NumberAnimation {duration: 1000}} + background: Rectangle { + anchors.fill: parent + color: DefaultStyle.grey_0 + border.color: mainItem.contentColor + border.width: 1 * DefaultStyle.dp + radius: 50 * DefaultStyle.dp + } + contentItem: RowLayout { + Image { + visible: mainItem.imageSource != undefined + source: mainItem.imageSource + Layout.preferredWidth: 24 * DefaultStyle.dp + Layout.preferredHeight: 24 * DefaultStyle.dp + fillMode: Image.PreserveAspectFit + Layout.fillWidth: true + } + Text { + color: mainItem.contentColor + text: mainItem.text + Layout.fillWidth: true + font { + pixelSize: 14 * DefaultStyle.dp + } + } + } +} \ No newline at end of file diff --git a/Linphone/view/Item/Participant/ParticipantListView.qml b/Linphone/view/Item/Participant/ParticipantListView.qml index 1c8288516..5653411e0 100644 --- a/Linphone/view/Item/Participant/ParticipantListView.qml +++ b/Linphone/view/Item/Participant/ParticipantListView.qml @@ -85,7 +85,6 @@ ListView { Layout.preferredWidth: 20 * DefaultStyle.dp Layout.preferredHeight: 20 * DefaultStyle.dp color: DefaultStyle.main2_100 - pressedColor: DefaultStyle.main2_200 icon.source: AppIcons.closeX icon.width: 14 * DefaultStyle.dp icon.height: 14 * DefaultStyle.dp diff --git a/Linphone/view/Layout/Call/ActiveSpeakerLayout.qml b/Linphone/view/Layout/Call/ActiveSpeakerLayout.qml index fad021603..3f38326cb 100644 --- a/Linphone/view/Layout/Call/ActiveSpeakerLayout.qml +++ b/Linphone/view/Layout/Call/ActiveSpeakerLayout.qml @@ -83,7 +83,6 @@ Item{ Button { color: "transparent" borderColor: DefaultStyle.main2_400 - pressedColor: DefaultStyle.main2_500main icon.source: AppIcons.shareNetwork contentImageColor: DefaultStyle.main2_400 text: qsTr("Share invitation") diff --git a/Linphone/view/Layout/Contact/ContactLayout.qml b/Linphone/view/Layout/Contact/ContactLayout.qml index c13f62e8c..1959dacb9 100644 --- a/Linphone/view/Layout/Contact/ContactLayout.qml +++ b/Linphone/view/Layout/Contact/ContactLayout.qml @@ -148,7 +148,6 @@ ColumnLayout { Layout.alignment: Qt.AlignHCenter text: qsTr("Rejoindre la réunion") color: DefaultStyle.main2_200 - pressedColor: DefaultStyle.main2_400 textColor: DefaultStyle.main2_600 onClicked: { if (mainItem.conferenceInfo) { diff --git a/Linphone/view/Style/DefaultStyle.qml b/Linphone/view/Style/DefaultStyle.qml index dcb3d61f7..b52ed4b5b 100644 --- a/Linphone/view/Style/DefaultStyle.qml +++ b/Linphone/view/Style/DefaultStyle.qml @@ -4,7 +4,6 @@ import QtQuick 2.15 QtObject { property color main1_100: "#FFEACB" property color main1_500_main: "#FE5E00" - property color main1_500_main_darker: "#C94C02" property color main2_0: "#FAFEFF" property color main2_100: "#EEF6F8" @@ -29,7 +28,6 @@ QtObject { property color warning_600: "#DBB820" property color danger_500main: "#DD5F5F" property color success_500main: "#4FAE80" - property color success_500main_darker: "#3F8C67" property color info_500_main: "#4AA8FF" property color vue_meter_light_green: "#6FF88D"