enlarge call notif

This commit is contained in:
Gaelle Braud 2024-11-27 17:33:49 +01:00
parent 723731c7e5
commit d24a68e2a7

View file

@ -9,8 +9,8 @@ Notification {
radius: 20 * DefaultStyle.dp radius: 20 * DefaultStyle.dp
backgroundColor: DefaultStyle.grey_600 backgroundColor: DefaultStyle.grey_600
backgroundOpacity: 0.8 backgroundOpacity: 0.8
overriddenWidth: 245 * DefaultStyle.dp// overriddenWidth: 400 * DefaultStyle.dp
overriddenHeight: content.height //126 * DefaultStyle.dp// overriddenHeight: content.height
readonly property var call: notificationData && notificationData.call readonly property var call: notificationData && notificationData.call
property var state: call.core.state property var state: call.core.state
@ -27,109 +27,115 @@ Notification {
Popup { Popup {
id: content id: content
visible: mainItem.visible visible: mainItem.visible
leftPadding: 16 * DefaultStyle.dp leftPadding: 32 * DefaultStyle.dp
rightPadding: 16 * DefaultStyle.dp rightPadding: 32 * DefaultStyle.dp
topPadding: 3 * DefaultStyle.dp topPadding: 9 * DefaultStyle.dp
bottomPadding: 3 * DefaultStyle.dp bottomPadding: 18 * DefaultStyle.dp
anchors.centerIn: parent anchors.centerIn: parent
background: Item{} background: Item{}
contentItem: ColumnLayout { contentItem: ColumnLayout {
anchors.centerIn: parent anchors.verticalCenter: parent.verticalCenter
spacing: 9 * DefaultStyle.dp spacing: 9 * DefaultStyle.dp
RowLayout { RowLayout {
spacing: 4 * DefaultStyle.dp spacing: 4 * DefaultStyle.dp
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Image { Image {
Layout.preferredWidth: 10 * DefaultStyle.dp Layout.preferredWidth: 12 * DefaultStyle.dp
Layout.preferredHeight: 10 * DefaultStyle.dp Layout.preferredHeight: 12 * DefaultStyle.dp
source: AppIcons.logo source: AppIcons.logo
} }
Text { Text {
text: "Linphone" text: "Linphone"
color: DefaultStyle.grey_0 color: DefaultStyle.grey_0
font { font {
pixelSize: 8 * DefaultStyle.dp pixelSize: 12 * DefaultStyle.dp
weight: 600 * DefaultStyle.dp weight: 600 * DefaultStyle.dp
capitalization: Font.Capitalize capitalization: Font.Capitalize
} }
} }
} }
ColumnLayout { ColumnLayout {
spacing: 2 * DefaultStyle.dp spacing: 17 * DefaultStyle.dp
Layout.alignment: Qt.AlignHCenter ColumnLayout {
Avatar { spacing: 14 * DefaultStyle.dp
Layout.preferredWidth: 40 * DefaultStyle.dp
Layout.preferredHeight: 40 * DefaultStyle.dp
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
call: mainItem.call Avatar {
Layout.preferredWidth: 60 * DefaultStyle.dp
Layout.preferredHeight: 60 * DefaultStyle.dp
Layout.alignment: Qt.AlignHCenter
call: mainItem.call
}
ColumnLayout {
spacing: 0
Text {
text: call.core.remoteName
Layout.fillWidth: true
Layout.maximumWidth: (mainItem.width - content.leftPadding - content.rightPadding) * DefaultStyle.dp
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
maximumLineCount: 1
color: DefaultStyle.grey_0
font {
pixelSize: 20 * DefaultStyle.dp
weight: 600 * DefaultStyle.dp
capitalization: Font.Capitalize
}
}
Text {
text: qsTr("Appel audio")
Layout.alignment: Qt.AlignHCenter
color: DefaultStyle.grey_0
font {
pixelSize: 14 * DefaultStyle.dp
weight: 500 * DefaultStyle.dp
}
}
}
} }
Text { RowLayout {
text: call.core.remoteName Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true Layout.fillWidth: true
Layout.maximumWidth: 200 * DefaultStyle.dp spacing: 26 * DefaultStyle.dp
Layout.alignment: Qt.AlignHCenter Button {
horizontalAlignment: Text.AlignHCenter spacing: 6 * DefaultStyle.dp
maximumLineCount: 1 color: DefaultStyle.success_500main
color: DefaultStyle.grey_0 borderColor: color
font { Layout.preferredWidth: 118 * DefaultStyle.dp
pixelSize: 14 * DefaultStyle.dp Layout.preferredHeight: 32 * DefaultStyle.dp
weight: 600 * DefaultStyle.dp asynchronous: false
capitalization: Font.Capitalize icon.source: AppIcons.phone
icon.width: 19 * DefaultStyle.dp
icon.height: 19 * DefaultStyle.dp
contentImageColor: DefaultStyle.grey_0
text: qsTr("Répondre")
textColor: DefaultStyle.grey_0
textSize: 14 * DefaultStyle.dp
textWeight: 500 * DefaultStyle.dp
onClicked: {
console.debug("[NotificationReceivedCall] Accept click")
UtilsCpp.openCallsWindow(mainItem.call)
mainItem.call.core.lAccept(false)
}
} }
} Button {
Text { spacing: 6 * DefaultStyle.dp
text: qsTr("Vous appelle...") color: DefaultStyle.danger_500main
Layout.alignment: Qt.AlignHCenter borderColor: color
color: DefaultStyle.grey_0 Layout.preferredWidth: 118 * DefaultStyle.dp
font { Layout.preferredHeight: 32 * DefaultStyle.dp
pixelSize: 10 * DefaultStyle.dp asynchronous: false
weight: 500 * DefaultStyle.dp icon.source: AppIcons.endCall
} icon.width: 19 * DefaultStyle.dp
} icon.height: 19 * DefaultStyle.dp
} contentImageColor: DefaultStyle.grey_0
RowLayout { text: qsTr("Refuser")
Layout.alignment: Qt.AlignHCenter textColor: DefaultStyle.grey_0
Layout.fillWidth: true textSize: 14 * DefaultStyle.dp
spacing: 26 * DefaultStyle.dp textWeight: 500 * DefaultStyle.dp
Button { onClicked: {
spacing: 6 * DefaultStyle.dp console.debug("[NotificationReceivedCall] Decline click")
color: DefaultStyle.success_500main mainItem.call.core.lDecline()
borderColor: color }
Layout.preferredWidth: 93 * DefaultStyle.dp
Layout.preferredHeight: 25 * DefaultStyle.dp
asynchronous: false
icon.source: AppIcons.phone
icon.width: 14 * DefaultStyle.dp
icon.height: 14 * DefaultStyle.dp
contentImageColor: DefaultStyle.grey_0
text: qsTr("Répondre")
textColor: DefaultStyle.grey_0
textSize: 10 * DefaultStyle.dp
textWeight: 500 * DefaultStyle.dp
onClicked: {
console.debug("[NotificationReceivedCall] Accept click")
UtilsCpp.openCallsWindow(mainItem.call)
mainItem.call.core.lAccept(false)
}
}
Button {
spacing: 6 * DefaultStyle.dp
color: DefaultStyle.danger_500main
borderColor: color
Layout.preferredWidth: 93 * DefaultStyle.dp
Layout.preferredHeight: 25 * DefaultStyle.dp
asynchronous: false
icon.source: AppIcons.endCall
icon.width: 14 * DefaultStyle.dp
icon.height: 14 * DefaultStyle.dp
contentImageColor: DefaultStyle.grey_0
text: qsTr("Refuser")
textColor: DefaultStyle.grey_0
textSize: 10 * DefaultStyle.dp
textWeight: 500 * DefaultStyle.dp
onClicked: {
console.debug("[NotificationReceivedCall] Decline click")
mainItem.call.core.lDecline()
} }
} }
} }