diff --git a/Linphone/view/Control/Input/NumericPad.qml b/Linphone/view/Control/Input/NumericPad.qml index 0c5293e87..14842391d 100644 --- a/Linphone/view/Control/Input/NumericPad.qml +++ b/Linphone/view/Control/Input/NumericPad.qml @@ -192,12 +192,12 @@ FocusScope{ } } Item { - visible: !mainItem.lastRowVisible + visible: mainItem.lastRowVisible // Invisible item to move the last two buttons to the right } Button { id: launchCallButton - visible: !mainItem.lastRowVisible + visible: mainItem.lastRowVisible implicitWidth: 75 * DefaultStyle.dp implicitHeight: 55 * DefaultStyle.dp Layout.Layout.alignment: Qt.AlignHCenter @@ -221,7 +221,7 @@ FocusScope{ } Button { id: eraseButton - visible: !mainItem.lastRowVisible + visible: mainItem.lastRowVisible leftPadding: 5 * DefaultStyle.dp rightPadding: 5 * DefaultStyle.dp topPadding: 5 * DefaultStyle.dp diff --git a/Linphone/view/Control/Popup/NumericPadPopup.qml b/Linphone/view/Control/Popup/NumericPadPopup.qml index 216f7fe9b..689ac8d81 100644 --- a/Linphone/view/Control/Popup/NumericPadPopup.qml +++ b/Linphone/view/Control/Popup/NumericPadPopup.qml @@ -73,7 +73,7 @@ Control.Popup { } contentItem: NumericPad{ id: numPad - lastRowVisible: lastRowVisible + lastRowVisible: mainItem.lastRowVisible currentCall: mainItem.currentCall onButtonPressed: (text) => { console.log("BUTTON PRESSED NUMPAD") diff --git a/Linphone/view/Page/Form/Call/NewCallForm.qml b/Linphone/view/Page/Form/Call/NewCallForm.qml index ea644d0fb..5dd94123c 100644 --- a/Linphone/view/Page/Form/Call/NewCallForm.qml +++ b/Linphone/view/Page/Form/Call/NewCallForm.qml @@ -26,6 +26,7 @@ FocusScope { spacing: 22 * DefaultStyle.dp ColumnLayout { spacing: 18 * DefaultStyle.dp + visible: mainItem.displayCurrentCalls Text { text: qsTr("Appels en cours") font { @@ -38,7 +39,6 @@ FocusScope { Layout.preferredHeight: callList.height Layout.maximumHeight: mainItem.height/2 // Layout.fillHeight: true - visible: mainItem.displayCurrentCalls contentHeight: callList.height contentWidth: width RoundedPane { diff --git a/Linphone/view/Page/Window/Call/CallsWindow.qml b/Linphone/view/Page/Window/Call/CallsWindow.qml index c4f86cd85..4b3a99d79 100644 --- a/Linphone/view/Page/Window/Call/CallsWindow.qml +++ b/Linphone/view/Page/Window/Call/CallsWindow.qml @@ -610,14 +610,50 @@ AbstractWindow { id: numPadPopup width: parent.width roundedBottom: true + lastRowVisible: false visible: false leftPadding: 40 * DefaultStyle.dp rightPadding: 40 * DefaultStyle.dp topPadding: 41 * DefaultStyle.dp bottomPadding: 18 * DefaultStyle.dp - onLaunchCall: { - UtilsCpp.createCall(dialerTextInput.text) - } + } + } + } + } + } + Component { + id: newCallPanel + NewCallForm { + id: newCallForm + Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Nouvel appel") + anchors.fill: parent + anchors.topMargin: 21 * DefaultStyle.dp + anchors.leftMargin: 16 * DefaultStyle.dp + anchors.rightMargin: 16 * DefaultStyle.dp + groupCallVisible: false + searchBarColor: DefaultStyle.grey_0 + searchBarBorderColor: DefaultStyle.grey_200 + numPadPopup: numericPad + onContactClicked: (contact) => { + startCallWithContact(contact, false, rightPanel) + } + + Item { + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + height: 402 * DefaultStyle.dp + NumericPadPopup { + id: numericPad + width: parent.width + roundedBottom: true + visible: newCallForm.searchBar.numericPadButton.checked + leftPadding: 40 * DefaultStyle.dp + rightPadding: 40 * DefaultStyle.dp + topPadding: 41 * DefaultStyle.dp + bottomPadding: 18 * DefaultStyle.dp + onLaunchCall: { + UtilsCpp.createCall(newCallForm.searchBar.text) } } } @@ -1377,16 +1413,19 @@ AbstractWindow { } CheckableButton { id: newCallButton - checkable: false + checkable: true icon.source: AppIcons.newCall Layout.preferredWidth: 55 * DefaultStyle.dp Layout.preferredHeight: 55 * DefaultStyle.dp icon.width: 32 * DefaultStyle.dp icon.height: 32 * DefaultStyle.dp - onClicked: { - var mainWin = UtilsCpp.getMainWindow() - UtilsCpp.smartShowWindow(mainWin) - mainWin.goToNewCall() + onCheckedChanged: { + if (checked) { + rightPanel.visible = true + rightPanel.replace(newCallPanel) + } else { + rightPanel.visible = false + } } } }