mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
parent
92c0b34436
commit
2c5489468d
2 changed files with 15 additions and 11 deletions
|
@ -294,7 +294,7 @@ Pane {
|
||||||
Connections {
|
Connections {
|
||||||
function onNewInviteState() {
|
function onNewInviteState() {
|
||||||
if (CallManager.haveCallInvite && Settings.mobileMode) {
|
if (CallManager.haveCallInvite && Settings.mobileMode) {
|
||||||
var dialog = mobileCallInviteDialog.createObject(msgView);
|
var dialog = mobileCallInviteDialog.createObject(timelineRoot);
|
||||||
dialog.open();
|
dialog.open();
|
||||||
destroyOnClose(dialog);
|
destroyOnClose(dialog);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,8 @@ import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko 1.0
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
|
id: callInv
|
||||||
|
|
||||||
closePolicy: Popup.NoAutoClose
|
closePolicy: Popup.NoAutoClose
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
@ -40,16 +42,18 @@ Popup {
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.topMargin: msgView.height / 25
|
Layout.topMargin: callInv.parent.height / 25
|
||||||
|
Layout.fillWidth: true
|
||||||
text: CallManager.callPartyDisplayName
|
text: CallManager.callPartyDisplayName
|
||||||
font.pointSize: fontMetrics.font.pointSize * 2
|
font.pointSize: fontMetrics.font.pointSize * 2
|
||||||
color: Nheko.colors.windowText
|
color: Nheko.colors.windowText
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
Avatar {
|
Avatar {
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
width: msgView.height / 5
|
Layout.preferredHeight: callInv.height / 5
|
||||||
height: msgView.height / 5
|
Layout.preferredWidth: callInv.height / 5
|
||||||
url: CallManager.callPartyAvatarUrl.replace("mxc://", "image://MxcImage/")
|
url: CallManager.callPartyAvatarUrl.replace("mxc://", "image://MxcImage/")
|
||||||
userid: CallManager.callParty
|
userid: CallManager.callParty
|
||||||
displayName: CallManager.callPartyDisplayName
|
displayName: CallManager.callPartyDisplayName
|
||||||
|
@ -57,14 +61,14 @@ Popup {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.bottomMargin: msgView.height / 25
|
Layout.bottomMargin: callInv.height / 25
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
property string image: CallManager.callType == CallType.VIDEO ? ":/icons/icons/ui/video.svg" : ":/icons/icons/ui/place-call.svg"
|
property string image: CallManager.callType == CallType.VIDEO ? ":/icons/icons/ui/video.svg" : ":/icons/icons/ui/place-call.svg"
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.preferredWidth: msgView.height / 10
|
Layout.preferredWidth: callInv.height / 10
|
||||||
Layout.preferredHeight: msgView.height / 10
|
Layout.preferredHeight: callInv.height / 10
|
||||||
source: "image://colorimage/" + image + "?" + Nheko.colors.windowText
|
source: "image://colorimage/" + image + "?" + Nheko.colors.windowText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,10 +84,10 @@ Popup {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: deviceCombos
|
id: deviceCombos
|
||||||
|
|
||||||
property int imageSize: msgView.height / 20
|
property int imageSize: callInv.height / 20
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.bottomMargin: msgView.height / 25
|
Layout.bottomMargin: callInv.height / 25
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
@ -127,7 +131,7 @@ Popup {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: buttonLayout
|
id: buttonLayout
|
||||||
|
|
||||||
property int buttonSize: msgView.height / 8
|
property int buttonSize: callInv.height / 8
|
||||||
|
|
||||||
function validateMic() {
|
function validateMic() {
|
||||||
if (CallManager.mics.length == 0) {
|
if (CallManager.mics.length == 0) {
|
||||||
|
@ -143,7 +147,7 @@ Popup {
|
||||||
}
|
}
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
spacing: msgView.height / 6
|
spacing: callInv.height / 6
|
||||||
|
|
||||||
RoundButton {
|
RoundButton {
|
||||||
implicitWidth: buttonLayout.buttonSize
|
implicitWidth: buttonLayout.buttonSize
|
||||||
|
|
Loading…
Reference in a new issue