ui fixes
This commit is contained in:
parent
10427b5288
commit
d70b08c36e
11 changed files with 261 additions and 168 deletions
|
|
@ -34,7 +34,7 @@ void Thread::run() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool Thread::isInLinphoneThread() {
|
bool Thread::isInLinphoneThread() {
|
||||||
return QThread::currentThread() == CoreModel::getInstance()->thread();
|
return CoreModel::getInstance() && QThread::currentThread() == CoreModel::getInstance()->thread();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Thread::mustBeInLinphoneThread(const QString &context) {
|
bool Thread::mustBeInLinphoneThread(const QString &context) {
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,10 @@ Window {
|
||||||
|
|
||||||
property CallGui call
|
property CallGui call
|
||||||
property ConferenceInfoGui conferenceInfo
|
property ConferenceInfoGui conferenceInfo
|
||||||
onConferenceInfoChanged: console.log("CONFERENCE INFO", conferenceInfo)
|
|
||||||
|
|
||||||
property ConferenceGui conference: call && call.core.conference || null
|
property ConferenceGui conference: call && call.core.conference || null
|
||||||
|
onConferenceChanged: console.log ("CONFERENCE CHANGED", conference)
|
||||||
|
|
||||||
property bool callTerminatedByUser: false
|
property bool callTerminatedByUser: false
|
||||||
|
|
||||||
onCallChanged: {
|
onCallChanged: {
|
||||||
|
|
@ -56,7 +57,10 @@ Window {
|
||||||
onCallStateChanged: {
|
onCallStateChanged: {
|
||||||
console.log("State:", callState)
|
console.log("State:", callState)
|
||||||
if (callState === LinphoneEnums.CallState.Connected) {
|
if (callState === LinphoneEnums.CallState.Connected) {
|
||||||
if (conferenceInfo) middleItemStackView.replace(inCallItem)
|
if (conferenceInfo) {
|
||||||
|
middleItemStackView.replace(inCallItem)
|
||||||
|
bottomButtonsLayout.visible = true
|
||||||
|
}
|
||||||
if(!call.core.isSecured && call.core.encryption === LinphoneEnums.MediaEncryption.Zrtp) {
|
if(!call.core.isSecured && call.core.encryption === LinphoneEnums.MediaEncryption.Zrtp) {
|
||||||
zrtpValidation.open()
|
zrtpValidation.open()
|
||||||
}
|
}
|
||||||
|
|
@ -642,19 +646,17 @@ Window {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
layoutDirection: Qt.LeftToRight
|
layoutDirection: Qt.LeftToRight
|
||||||
columnSpacing: 20 * DefaultStyle.dp
|
columnSpacing: 20 * DefaultStyle.dp
|
||||||
visible: mainWindow.conferenceUri ? mainWindow.conferenceJoined : mainWindow.call
|
visible: mainWindow.call && !mainWindow.conferenceInfo
|
||||||
|
|
||||||
function refreshLayout() {
|
function refreshLayout() {
|
||||||
if (mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning) {
|
if (mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning) {
|
||||||
bottomButtonsLayout.layoutDirection = Qt.RightToLeft
|
bottomButtonsLayout.layoutDirection = Qt.RightToLeft
|
||||||
connectedCallButtons.visible = true
|
connectedCallButtons.visible = bottomButtonsLayout.visible
|
||||||
videoCameraButton.enabled = true
|
moreOptionsButton.visible = bottomButtonsLayout.visible
|
||||||
moreOptionsButton.visible = true
|
|
||||||
}
|
}
|
||||||
else if (mainWindow.callState === LinphoneEnums.CallState.OutgoingInit) {
|
else if (mainWindow.callState === LinphoneEnums.CallState.OutgoingInit) {
|
||||||
connectedCallButtons.visible = false
|
connectedCallButtons.visible = false
|
||||||
bottomButtonsLayout.layoutDirection = Qt.LeftToRight
|
bottomButtonsLayout.layoutDirection = Qt.LeftToRight
|
||||||
videoCameraButton.enabled = false
|
|
||||||
moreOptionsButton.visible = false
|
moreOptionsButton.visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -669,9 +671,12 @@ Window {
|
||||||
children[i].enabled = false
|
children[i].enabled = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BottomButton {
|
Button {
|
||||||
Layout.row: 0
|
Layout.row: 0
|
||||||
enabledIcon: AppIcons.endCall
|
icon.source: AppIcons.endCall
|
||||||
|
icon.width: 32 * DefaultStyle.dp
|
||||||
|
icon.height: 32 * DefaultStyle.dp
|
||||||
|
contentImageColor: DefaultStyle.grey_0
|
||||||
checkable: false
|
checkable: false
|
||||||
Layout.column: mainWindow.callState == LinphoneEnums.CallState.OutgoingInit
|
Layout.column: mainWindow.callState == LinphoneEnums.CallState.OutgoingInit
|
||||||
|| mainWindow.callState == LinphoneEnums.CallState.OutgoingProgress
|
|| mainWindow.callState == LinphoneEnums.CallState.OutgoingProgress
|
||||||
|
|
@ -696,7 +701,7 @@ Window {
|
||||||
visible: false
|
visible: false
|
||||||
Layout.row: 0
|
Layout.row: 0
|
||||||
Layout.column: 1
|
Layout.column: 1
|
||||||
BottomButton {
|
CheckableButton {
|
||||||
id: pauseButton
|
id: pauseButton
|
||||||
Layout.preferredWidth: 55 * DefaultStyle.dp
|
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||||
|
|
@ -712,17 +717,20 @@ Window {
|
||||||
: DefaultStyle.grey_600
|
: DefaultStyle.grey_600
|
||||||
}
|
}
|
||||||
enabled: mainWindow.callState != LinphoneEnums.CallState.PausedByRemote
|
enabled: mainWindow.callState != LinphoneEnums.CallState.PausedByRemote
|
||||||
enabledIcon: enabled && checked ? AppIcons.play : AppIcons.pause
|
icon.source: enabled && checked ? AppIcons.play : AppIcons.pause
|
||||||
checked: mainWindow.call && mainWindow.call.core.paused
|
checked: mainWindow.call && mainWindow.call.core.paused
|
||||||
onClicked: {
|
onCheckedChanged: {
|
||||||
mainWindow.call.core.lSetPaused(!callsModel.currentCall.core.paused)
|
mainWindow.call.core.lSetPaused(!mainWindow.call.core.paused)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BottomButton {
|
CheckableButton {
|
||||||
id: transferCallButton
|
id: transferCallButton
|
||||||
enabledIcon: AppIcons.transferCall
|
icon.source: AppIcons.transferCall
|
||||||
Layout.preferredWidth: 55 * DefaultStyle.dp
|
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||||
|
contentImageColor: enabled ? DefaultStyle.grey_0 : DefaultStyle.grey_500
|
||||||
|
onEnabledChanged: console.log("===================enable change", enabled)
|
||||||
|
onContentImageColorChanged: console.log("===================================== content image color", contentImageColor)
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
rightPanel.visible = true
|
rightPanel.visible = true
|
||||||
|
|
@ -736,10 +744,10 @@ Window {
|
||||||
onVisibleChanged: if(!rightPanel.visible) transferCallButton.checked = false
|
onVisibleChanged: if(!rightPanel.visible) transferCallButton.checked = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BottomButton {
|
CheckableButton {
|
||||||
id: newCallButton
|
id: newCallButton
|
||||||
checkable: false
|
checkable: false
|
||||||
enabledIcon: AppIcons.newCall
|
icon.source: AppIcons.newCall
|
||||||
Layout.preferredWidth: 55 * DefaultStyle.dp
|
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
@ -757,41 +765,42 @@ Window {
|
||||||
|| mainWindow.callState == LinphoneEnums.CallState.OutgoingEarlyMedia
|
|| mainWindow.callState == LinphoneEnums.CallState.OutgoingEarlyMedia
|
||||||
|| mainWindow.callState == LinphoneEnums.CallState.IncomingReceived
|
|| mainWindow.callState == LinphoneEnums.CallState.IncomingReceived
|
||||||
? bottomButtonsLayout.columns - 1 : 0
|
? bottomButtonsLayout.columns - 1 : 0
|
||||||
BottomButton {
|
CheckableButton {
|
||||||
id: videoCameraButton
|
id: videoCameraButton
|
||||||
enabledIcon: AppIcons.videoCamera
|
enabled: mainWindow.conferenceInfo || (mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning)
|
||||||
disabledIcon: AppIcons.videoCameraSlash
|
iconUrl: AppIcons.videoCamera
|
||||||
|
checkedIconUrl: AppIcons.videoCameraSlash
|
||||||
checked: mainWindow.call && !mainWindow.call.core.cameraEnabled
|
checked: mainWindow.call && !mainWindow.call.core.cameraEnabled
|
||||||
Layout.preferredWidth: 55 * DefaultStyle.dp
|
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||||
onClicked: mainWindow.call.core.lSetCameraEnabled(!mainWindow.call.core.cameraEnabled)
|
onCheckedChanged: mainWindow.call.core.lSetCameraEnabled(!mainWindow.call.core.cameraEnabled)
|
||||||
}
|
}
|
||||||
BottomButton {
|
CheckableButton {
|
||||||
enabledIcon: AppIcons.microphone
|
iconUrl: AppIcons.microphone
|
||||||
disabledIcon: AppIcons.microphoneSlash
|
checkedIconUrl: AppIcons.microphoneSlash
|
||||||
checked: mainWindow.call && mainWindow.call.core.microphoneMuted
|
checked: mainWindow.call && mainWindow.call.core.microphoneMuted
|
||||||
Layout.preferredWidth: 55 * DefaultStyle.dp
|
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||||
onClicked: mainWindow.call.core.lSetMicrophoneMuted(!mainWindow.call.core.microphoneMuted)
|
onCheckedChanged: mainWindow.call.core.lSetMicrophoneMuted(!mainWindow.call.core.microphoneMuted)
|
||||||
}
|
}
|
||||||
PopupButton {
|
PopupButton {
|
||||||
id: moreOptionsButton
|
id: moreOptionsButton
|
||||||
Layout.preferredWidth: 55 * DefaultStyle.dp
|
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||||
|
onEnabledChanged: console.log("========== enabled changed", enabled)
|
||||||
|
contentImageColor: enabled && !checked ? DefaultStyle.grey_0 : DefaultStyle.grey_500
|
||||||
|
icon.width: 24 * DefaultStyle.dp
|
||||||
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
icon.source: AppIcons.more
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: moreOptionsButton
|
anchors.fill: moreOptionsButton
|
||||||
color: moreOptionsButton.checked ? DefaultStyle.grey_0 : DefaultStyle.grey_500
|
color: moreOptionsButton.enabled
|
||||||
|
? moreOptionsButton.checked
|
||||||
|
? DefaultStyle.grey_0
|
||||||
|
: DefaultStyle.grey_500
|
||||||
|
: DefaultStyle.grey_600
|
||||||
radius: 40 * DefaultStyle.dp
|
radius: 40 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
contentItem: Item {
|
|
||||||
EffectImage {
|
|
||||||
imageSource: AppIcons.more
|
|
||||||
width: 24 * DefaultStyle.dp
|
|
||||||
height: 24 * DefaultStyle.dp
|
|
||||||
anchors.centerIn: parent
|
|
||||||
colorizationColor: moreOptionsButton.checked ? DefaultStyle.grey_500 : DefaultStyle.grey_0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
popup.x: width/2
|
popup.x: width/2
|
||||||
popup.y: y - popup.height + height/4
|
popup.y: y - popup.height + height/4
|
||||||
popup.contentItem: ColumnLayout {
|
popup.contentItem: ColumnLayout {
|
||||||
|
|
@ -864,30 +873,7 @@ Window {
|
||||||
mainWindow.call && mainWindow.call.core.recording ? mainWindow.call.core.lStopRecording() : mainWindow.call.core.lStartRecording()
|
mainWindow.call && mainWindow.call.core.recording ? mainWindow.call.core.lStopRecording() : mainWindow.call.core.lStartRecording()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Control.Button {
|
Button {
|
||||||
id: speakerButton
|
|
||||||
Layout.fillWidth: true
|
|
||||||
checkable: true
|
|
||||||
background: Item {}
|
|
||||||
contentItem: RowLayout {
|
|
||||||
EffectImage {
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
imageSource: AppIcons.recordFill
|
|
||||||
colorizationColor: mainWindow.call && mainWindow.call.core.recording ? DefaultStyle.danger_500main : undefined
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
color: mainWindow.call && mainWindow.call.core.recording ? DefaultStyle.danger_500main : DefaultStyle.main2_600
|
|
||||||
text: mainWindow.call && mainWindow.call.core.recording ? qsTr("Terminer l'enregistrement") : qsTr("Enregistrer l'appel")
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
onClicked: {
|
|
||||||
mainWindow.call.core.recording ? mainWindow.call.core.lStopRecording() : mainWindow.call.core.lStartRecording()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Control.Button {
|
|
||||||
id: settingsButton
|
id: settingsButton
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
background: Item{}
|
background: Item{}
|
||||||
|
|
|
||||||
|
|
@ -138,21 +138,21 @@ Item {
|
||||||
}
|
}
|
||||||
Popup {
|
Popup {
|
||||||
id: listPopup
|
id: listPopup
|
||||||
width: magicSearchList.width + listPopup.rightPadding + listPopup.leftPadding
|
width: magicSearchBar.width
|
||||||
height: Math.min(magicSearchList.contentHeight, 300 * DefaultStyle.dp + topPadding + bottomPadding)
|
height: Math.min(magicSearchList.contentHeight + topPadding + bottomPadding, 400 * DefaultStyle.dp)
|
||||||
y: magicSearchBar.height
|
y: magicSearchBar.height
|
||||||
closePolicy: Popup.NoAutoClose
|
closePolicy: Popup.NoAutoClose
|
||||||
topPadding: 10 * DefaultStyle.dp
|
topPadding: 10 * DefaultStyle.dp
|
||||||
bottomPadding: 10 * DefaultStyle.dp
|
bottomPadding: 10 * DefaultStyle.dp
|
||||||
rightPadding: 10 * DefaultStyle.dp
|
rightPadding: 10 * DefaultStyle.dp
|
||||||
leftPadding: 10 * DefaultStyle.dp
|
leftPadding: 10 * DefaultStyle.dp
|
||||||
|
|
||||||
background: Item {
|
background: Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: popupBg
|
id: popupBg
|
||||||
radius: 15 * DefaultStyle.dp
|
radius: 15 * DefaultStyle.dp
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
// width: magicSearchList.width + listPopup.rightPadding + listPopup.leftPadding
|
|
||||||
}
|
}
|
||||||
MultiEffect {
|
MultiEffect {
|
||||||
source: popupBg
|
source: popupBg
|
||||||
|
|
@ -166,22 +166,32 @@ Item {
|
||||||
Control.ScrollBar {
|
Control.ScrollBar {
|
||||||
id: scrollbar
|
id: scrollbar
|
||||||
height: parent.height
|
height: parent.height
|
||||||
anchors.right: parent.right
|
anchors.right: listPopup.right
|
||||||
}
|
}
|
||||||
ContactsList {
|
contentItem: ContactsList {
|
||||||
id: magicSearchList
|
id: magicSearchList
|
||||||
visible: magicSearchBar.text.length != 0
|
visible: magicSearchBar.text.length != 0
|
||||||
height: Math.min(contentHeight, listPopup.height)
|
height: contentHeight
|
||||||
width: magicSearchBar.width
|
width: magicSearchBar.width
|
||||||
|
headerPositioning: ListView.OverlayHeader
|
||||||
|
rightMargin: 15 * DefaultStyle.dp
|
||||||
initialHeadersVisible: false
|
initialHeadersVisible: false
|
||||||
contactMenuVisible: false
|
contactMenuVisible: false
|
||||||
|
actionMenuVisible: true
|
||||||
model: MagicSearchProxy {
|
model: MagicSearchProxy {
|
||||||
searchText: magicSearchBar.text.length === 0 ? "*" : magicSearchBar.text
|
searchText: magicSearchBar.text.length === 0 ? "*" : magicSearchBar.text
|
||||||
aggregationFlag: LinphoneEnums.MagicSearchAggregation.Friend
|
aggregationFlag: LinphoneEnums.MagicSearchAggregation.Friend
|
||||||
}
|
}
|
||||||
Control.ScrollBar.vertical: scrollbar
|
Control.ScrollBar.vertical: scrollbar
|
||||||
header: ColumnLayout {
|
header: Control.Control {
|
||||||
|
z: 2
|
||||||
width: magicSearchList.width
|
width: magicSearchList.width
|
||||||
|
leftPadding: 10 * DefaultStyle.dp
|
||||||
|
rightPadding: 10 * DefaultStyle.dp
|
||||||
|
background: Rectangle {
|
||||||
|
color: DefaultStyle.grey_0
|
||||||
|
}
|
||||||
|
contentItem: ColumnLayout {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
|
|
@ -212,6 +222,7 @@ Item {
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
property var callObj
|
property var callObj
|
||||||
contentItem: Image {
|
contentItem: Image {
|
||||||
|
anchors.fill: parent
|
||||||
width: 24 * DefaultStyle.dp
|
width: 24 * DefaultStyle.dp
|
||||||
height: 24 * DefaultStyle.dp
|
height: 24 * DefaultStyle.dp
|
||||||
source: AppIcons.phone
|
source: AppIcons.phone
|
||||||
|
|
@ -220,9 +231,22 @@ Item {
|
||||||
callObj = UtilsCpp.createCall(sipAddr.text)
|
callObj = UtilsCpp.createCall(sipAddr.text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Button {
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
background: Item{}
|
||||||
|
contentItem: Image {
|
||||||
|
anchors.fill: parent
|
||||||
|
width: 24 * DefaultStyle.dp
|
||||||
|
height: 24 * DefaultStyle.dp
|
||||||
|
source: AppIcons.videoCamera
|
||||||
|
}
|
||||||
|
onClicked: callObj = UtilsCpp.createCall(sipAddr.text, true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
color: DefaultStyle.main2_200
|
color: DefaultStyle.main2_200
|
||||||
pressedColor: DefaultStyle.main2_400
|
pressedColor: DefaultStyle.main2_400
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|
@ -251,16 +275,6 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delegateButtons: Button {
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
background: Item{}
|
|
||||||
contentItem: Image {
|
|
||||||
anchors.fill: parent
|
|
||||||
width: 24 * DefaultStyle.dp
|
|
||||||
height: 24 * DefaultStyle.dp
|
|
||||||
source: AppIcons.phone
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import Linphone
|
||||||
import UtilsCpp 1.0
|
import UtilsCpp 1.0
|
||||||
import SettingsCpp 1.0
|
import SettingsCpp 1.0
|
||||||
|
|
||||||
Window {
|
ApplicationWindow {
|
||||||
id: mainWindow
|
id: mainWindow
|
||||||
width: 1512 * DefaultStyle.dp
|
width: 1512 * DefaultStyle.dp
|
||||||
height: 982 * DefaultStyle.dp
|
height: 982 * DefaultStyle.dp
|
||||||
|
|
@ -15,6 +15,15 @@ Window {
|
||||||
property bool firstConnection: true
|
property bool firstConnection: true
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
|
// TODO : use this to make the border transparent
|
||||||
|
// flags: Qt.Window | Qt.FramelessWindowHint | Qt.WindowTitleHint
|
||||||
|
// menuBar: Rectangle {
|
||||||
|
// width: parent.width
|
||||||
|
// height: 40 * DefaultStyle.dp
|
||||||
|
// color: DefaultStyle.grey_100
|
||||||
|
// }
|
||||||
|
|
||||||
function goToNewCall() {
|
function goToNewCall() {
|
||||||
mainWindowStackView.replace(mainPage, StackView.Immediate)
|
mainWindowStackView.replace(mainPage, StackView.Immediate)
|
||||||
mainWindowStackView.currentItem.goToNewCall()
|
mainWindowStackView.currentItem.goToNewCall()
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ Control.Button {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property int capitalization
|
property int capitalization
|
||||||
property color color: DefaultStyle.main1_500_main
|
property color color: DefaultStyle.main1_500_main
|
||||||
|
property color borderColor: "transparent"
|
||||||
property color pressedColor: DefaultStyle.main1_500_main_darker
|
property color pressedColor: DefaultStyle.main1_500_main_darker
|
||||||
property bool inversedColors: false
|
property bool inversedColors: false
|
||||||
property int textSize: 18 * DefaultStyle.dp
|
property int textSize: 18 * DefaultStyle.dp
|
||||||
|
|
@ -15,7 +16,6 @@ Control.Button {
|
||||||
property bool underline: false
|
property bool underline: false
|
||||||
property bool shadowEnabled: false
|
property bool shadowEnabled: false
|
||||||
property var contentImageColor
|
property var contentImageColor
|
||||||
property alias contentText: contentText
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
icon.width: width
|
icon.width: width
|
||||||
icon.height: height
|
icon.height: height
|
||||||
|
|
@ -44,7 +44,7 @@ Control.Button {
|
||||||
? mainItem.pressedColor
|
? mainItem.pressedColor
|
||||||
: mainItem.color
|
: mainItem.color
|
||||||
radius: 48 * DefaultStyle.dp
|
radius: 48 * DefaultStyle.dp
|
||||||
border.color: inversedColors ? mainItem.color : "transparent"
|
border.color: inversedColors ? mainItem.color : mainItem.borderColor
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -64,15 +64,48 @@ Control.Button {
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: StackLayout {
|
contentItem: StackLayout {
|
||||||
currentIndex: mainItem.text.length != 0
|
currentIndex: mainItem.text.length != 0 && mainItem.icon.source != undefined
|
||||||
? 0
|
? 0
|
||||||
: mainItem.icon.source != undefined
|
: mainItem.text.length != 0
|
||||||
? 1
|
? 1
|
||||||
: 2
|
: mainItem.icon.source != undefined
|
||||||
|
? 2
|
||||||
|
: 3
|
||||||
|
|
||||||
width: mainItem.width
|
width: mainItem.width
|
||||||
|
RowLayout {
|
||||||
|
spacing: 5 * DefaultStyle.dp
|
||||||
|
EffectImage {
|
||||||
|
visible: mainItem.icon.source != undefined
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
imageSource: mainItem.icon.source
|
||||||
|
imageWidth: mainItem.icon.width
|
||||||
|
imageHeight: mainItem.icon.height
|
||||||
|
colorizationColor: mainItem.contentImageColor
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
visible: mainItem.text != undefined
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
width: mainItem.text != undefined ? implicitWidth : 0
|
||||||
|
height: implicitHeight
|
||||||
|
wrapMode: Text.WrapAnywhere
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
text: mainItem.text
|
||||||
|
maximumLineCount: 1
|
||||||
|
color: inversedColors ? mainItem.color : DefaultStyle.grey_0
|
||||||
|
font {
|
||||||
|
pixelSize: mainItem.textSize
|
||||||
|
weight: mainItem.textWeight
|
||||||
|
family: DefaultStyle.defaultFont
|
||||||
|
capitalization: mainItem.capitalization
|
||||||
|
underline: mainItem.underline
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Text {
|
Text {
|
||||||
id: contentText
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
|
@ -92,7 +125,6 @@ Control.Button {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EffectImage {
|
EffectImage {
|
||||||
id: image
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
@ -102,8 +134,8 @@ Control.Button {
|
||||||
colorizationColor: mainItem.contentImageColor
|
colorizationColor: mainItem.contentImageColor
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth : true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight : true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,7 @@ Button {
|
||||||
property string iconUrl
|
property string iconUrl
|
||||||
property string checkedIconUrl
|
property string checkedIconUrl
|
||||||
property color color: DefaultStyle.grey_500
|
property color color: DefaultStyle.grey_500
|
||||||
property color checkedColor: DefaultStyle.main2_400
|
property color checkedColor: color
|
||||||
leftPadding: 0
|
|
||||||
rightPadding: 0
|
|
||||||
topPadding: 0
|
|
||||||
bottomPadding: 0
|
|
||||||
checkable: true
|
checkable: true
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,15 @@ ListView {
|
||||||
height: contentHeight
|
height: contentHeight
|
||||||
visible: contentHeight > 0
|
visible: contentHeight > 0
|
||||||
clip: true
|
clip: true
|
||||||
|
rightMargin: 5 * DefaultStyle.dp
|
||||||
|
|
||||||
property string searchBarText
|
property string searchBarText
|
||||||
|
|
||||||
property bool hoverEnabled: true
|
property bool hoverEnabled: true
|
||||||
|
// dots popup menu
|
||||||
property bool contactMenuVisible: true
|
property bool contactMenuVisible: true
|
||||||
|
// call, video call etc menu
|
||||||
|
property bool actionMenuVisible: true
|
||||||
property bool initialHeadersVisible: true
|
property bool initialHeadersVisible: true
|
||||||
property bool displayNameCapitalization: true
|
property bool displayNameCapitalization: true
|
||||||
property bool showOnlyFavourites: false
|
property bool showOnlyFavourites: false
|
||||||
|
|
@ -34,8 +38,6 @@ ListView {
|
||||||
property int delegateLeftMargin: 0
|
property int delegateLeftMargin: 0
|
||||||
currentIndex: -1
|
currentIndex: -1
|
||||||
|
|
||||||
property var delegateButtons: []
|
|
||||||
|
|
||||||
property FriendGui selectedContact: model.getAt(currentIndex) || null
|
property FriendGui selectedContact: model.getAt(currentIndex) || null
|
||||||
|
|
||||||
onCurrentIndexChanged: selectedContact = model.getAt(currentIndex) || null
|
onCurrentIndexChanged: selectedContact = model.getAt(currentIndex) || null
|
||||||
|
|
@ -88,6 +90,7 @@ ListView {
|
||||||
anchors.left: initial.visible ? initial.right : parent.left
|
anchors.left: initial.visible ? initial.right : parent.left
|
||||||
anchors.leftMargin: 10 * DefaultStyle.dp + mainItem.delegateLeftMargin
|
anchors.leftMargin: 10 * DefaultStyle.dp + mainItem.delegateLeftMargin
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 10 * DefaultStyle.dp
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
z: 1
|
z: 1
|
||||||
|
|
@ -122,12 +125,39 @@ ListView {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: actionsRow
|
id: actionsRow
|
||||||
z: 1
|
z: 1
|
||||||
anchors.fill: parent
|
visible: mainItem.actionMenuVisible || friendPopup.visible
|
||||||
anchors.rightMargin: 5 * DefaultStyle.dp
|
// anchors.fill: parent
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 10 * DefaultStyle.dp
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
RowLayout{
|
RowLayout{
|
||||||
Layout.fillWidth: true
|
property var callObj
|
||||||
Layout.fillHeight: true
|
visible: mainItem.actionMenuVisible
|
||||||
children: mainItem.delegateButtons
|
spacing: 10 * DefaultStyle.dp
|
||||||
|
Button {
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
background: Item{}
|
||||||
|
contentItem: Image {
|
||||||
|
anchors.fill: parent
|
||||||
|
width: 24 * DefaultStyle.dp
|
||||||
|
height: 24 * DefaultStyle.dp
|
||||||
|
source: AppIcons.phone
|
||||||
|
}
|
||||||
|
onClicked: callObj = UtilsCpp.createCall(modelData.core.defaultAddress)
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
background: Item{}
|
||||||
|
contentItem: Image {
|
||||||
|
anchors.fill: parent
|
||||||
|
width: 24 * DefaultStyle.dp
|
||||||
|
height: 24 * DefaultStyle.dp
|
||||||
|
source: AppIcons.videoCamera
|
||||||
|
}
|
||||||
|
onClicked: callObj = UtilsCpp.createCall(modelData.core.defaultAddress, true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
PopupButton {
|
PopupButton {
|
||||||
id: friendPopup
|
id: friendPopup
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ Loader {
|
||||||
sourceComponent: Item {
|
sourceComponent: Item {
|
||||||
Image {
|
Image {
|
||||||
id: image
|
id: image
|
||||||
visible: !effect2.enabled
|
visible: !effect2.effectEnabled
|
||||||
source: mainItem.imageSource ? mainItem.imageSource : ""
|
source: mainItem.imageSource ? mainItem.imageSource : ""
|
||||||
fillMode: mainItem.fillMode
|
fillMode: mainItem.fillMode
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
|
|
@ -34,18 +34,18 @@ Loader {
|
||||||
anchors.fill: image
|
anchors.fill: image
|
||||||
source: image
|
source: image
|
||||||
maskSource: image
|
maskSource: image
|
||||||
brightness: effect2.enabled ? 1.0 : 0.0
|
brightness: effect2.effectEnabled ? 1.0 : 0.0
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiEffect {
|
MultiEffect {
|
||||||
id: effect2
|
id: effect2
|
||||||
visible: mainItem.useColor
|
visible: mainItem.useColor
|
||||||
enabled: mainItem.useColor
|
property bool effectEnabled: mainItem.useColor
|
||||||
anchors.fill: effect
|
anchors.fill: effect
|
||||||
source: effect
|
source: effect
|
||||||
maskSource: effect
|
maskSource: effect
|
||||||
colorizationColor: effect2.enabled && mainItem.colorizationColor ? mainItem.colorizationColor : 'black'
|
colorizationColor: effectEnabled && mainItem.colorizationColor ? mainItem.colorizationColor : 'black'
|
||||||
colorization: effect2.enabled ? 1.0: 0.0
|
colorization: effectEnabled ? 1.0: 0.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,26 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ColumnLayout {
|
||||||
|
// id: waitingForParticipant
|
||||||
|
// Text {
|
||||||
|
// text: qsTr("Waiting for other participants...")
|
||||||
|
// color: DefaultStyle.frey_0
|
||||||
|
// font {
|
||||||
|
// pixelSize: 30 * DefaultStyle.dp
|
||||||
|
// weight: 300 * DefaultStyle.dp
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// Button {
|
||||||
|
// inversedColors: true
|
||||||
|
// text: qsTr("Share invitation")
|
||||||
|
// icon.source: AppIcons.shareNetwork
|
||||||
|
// color: DefaultStyle.main2_400
|
||||||
|
// Layout.preferredWidth: 206 * DefaultStyle.dp
|
||||||
|
// Layout.preferredHeight: 47 * DefaultStyle.dp
|
||||||
|
// }
|
||||||
|
// }
|
||||||
/*
|
/*
|
||||||
Sticker {
|
Sticker {
|
||||||
id: preview
|
id: preview
|
||||||
|
|
|
||||||
|
|
@ -111,4 +111,7 @@ ColumnLayout {
|
||||||
searchBarText: searchbar.text
|
searchBarText: searchbar.text
|
||||||
onContactAddedToSelection: participantList.positionViewAtEnd()
|
onContactAddedToSelection: participantList.positionViewAtEnd()
|
||||||
}
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -368,8 +368,9 @@ AbstractMainPage {
|
||||||
inversedColors: true
|
inversedColors: true
|
||||||
color: DefaultStyle.main2_600
|
color: DefaultStyle.main2_600
|
||||||
background: Item{}
|
background: Item{}
|
||||||
|
property var callObj
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("TODO: join conf", text)
|
callObj = UtilsCpp.createCall(mainItem.selectedConference.core.uri)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
|
@ -377,7 +378,10 @@ AbstractMainPage {
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
background: Item{}
|
background: Item{}
|
||||||
icon.source: AppIcons.shareNetwork
|
icon.source: AppIcons.shareNetwork
|
||||||
onClicked: UtilsCpp.copyToClipboard(confUri.text)
|
onClicked: {
|
||||||
|
UtilsCpp.copyToClipboard(mainItem.selectedConference.core.uri)
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Enregistré"), qsTr("Le lien de la réunion a été copié dans le presse-papiers"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
@ -513,7 +517,6 @@ AbstractMainPage {
|
||||||
topPadding: 11 * DefaultStyle.dp
|
topPadding: 11 * DefaultStyle.dp
|
||||||
bottomPadding: 11 * DefaultStyle.dp
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("TODO: join conf", mainItem.selectedConference.core.subject)
|
|
||||||
console.log(mainItem.selectedConference.core.uri)
|
console.log(mainItem.selectedConference.core.uri)
|
||||||
UtilsCpp.setupConference(mainItem.selectedConference)
|
UtilsCpp.setupConference(mainItem.selectedConference)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue