Quit fullscreen on escape button.
This commit is contained in:
parent
37db0a2394
commit
f60e8c36e3
3 changed files with 40 additions and 48 deletions
|
|
@ -664,8 +664,8 @@ AbstractMainPage {
|
||||||
implicitHeight: detailsButtons.implicitHeight
|
implicitHeight: detailsButtons.implicitHeight
|
||||||
implicitWidth: detailsButtons.implicitWidth
|
implicitWidth: detailsButtons.implicitWidth
|
||||||
Keys.onPressed: (event)=> {
|
Keys.onPressed: (event)=> {
|
||||||
if (event.key == Qt.Key_Left || event.key == Qt.Key_Escape) {
|
if (event.key == Qt.Key_Left || event.key == Qt.Key_Escape) {
|
||||||
detailOptions.popup.close()
|
detailOptions.popup.close()
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,19 +2,23 @@ import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls.Basic
|
import QtQuick.Controls.Basic
|
||||||
import Linphone
|
import Linphone
|
||||||
import UtilsCpp 1.0
|
import UtilsCpp
|
||||||
import SettingsCpp 1.0
|
import SettingsCpp
|
||||||
|
import DesktopToolsCpp
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: mainWindow
|
id: mainWindow
|
||||||
x: 0
|
x: 0
|
||||||
y: 0
|
y: 0
|
||||||
width: Math.min(1512 * DefaultStyle.dp, Screen.desktopAvailableWidth)
|
width: Math.min(1512 * DefaultStyle.dp, Screen.desktopAvailableWidth)
|
||||||
height: Math.min(982 * DefaultStyle.dp, Screen.desktopAvailableHeight)
|
height: Math.min(982 * DefaultStyle.dp, Screen.desktopAvailableHeight)
|
||||||
|
|
||||||
|
property bool isFullscreen: visibility == Window.FullScreen
|
||||||
|
onIsFullscreenChanged: DesktopToolsCpp.screenSaverStatus = !isFullscreen
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: forceActiveFocus()
|
onClicked: mainWindow.contentItem.forceActiveFocus()
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
|
|
|
||||||
|
|
@ -126,10 +126,10 @@ AbstractWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
enabled: !!call
|
enabled: !!mainWindow.call
|
||||||
target: call && call.core
|
target: mainWindow.call && mainWindow.call.core
|
||||||
function onSecurityUpdated() {
|
function onSecurityUpdated() {
|
||||||
if (call.core.encryption === LinphoneEnums.MediaEncryption.Zrtp) {
|
if (mainWindow.call.core.encryption === LinphoneEnums.MediaEncryption.Zrtp) {
|
||||||
if (call.core.tokenVerified) {
|
if (call.core.tokenVerified) {
|
||||||
zrtpValidation.close()
|
zrtpValidation.close()
|
||||||
zrtpValidationToast.open()
|
zrtpValidationToast.open()
|
||||||
|
|
@ -266,6 +266,10 @@ AbstractWindow {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: DefaultStyle.grey_900
|
color: DefaultStyle.grey_900
|
||||||
|
Keys.onEscapePressed: {
|
||||||
|
if(mainWindow.visibility == Window.FullScreen) mainWindow.showNormal()
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
|
|
@ -561,11 +565,9 @@ AbstractWindow {
|
||||||
NewCallForm {
|
NewCallForm {
|
||||||
id: newCallForm
|
id: newCallForm
|
||||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Transférer %1 à :").arg(mainWindow.call.core.remoteName)
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Transférer %1 à :").arg(mainWindow.call.core.remoteName)
|
||||||
Keys.onPressed: (event)=> {
|
Keys.onEscapePressed: (event) => {
|
||||||
if (event.key == Qt.Key_Escape) {
|
rightPanel.visible = false
|
||||||
rightPanel.visible = false
|
event.accepted = true
|
||||||
event.accepted = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
groupCallVisible: false
|
groupCallVisible: false
|
||||||
displayCurrentCalls: true
|
displayCurrentCalls: true
|
||||||
|
|
@ -654,11 +656,9 @@ AbstractWindow {
|
||||||
id: dialerPanelContent
|
id: dialerPanelContent
|
||||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Dialer")
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Dialer")
|
||||||
spacing: 0
|
spacing: 0
|
||||||
Keys.onPressed: (event)=> {
|
Keys.onEscapePressed: (event) => {
|
||||||
if (event.key == Qt.Key_Escape) {
|
rightPanel.visible = false
|
||||||
rightPanel.visible = false
|
event.accepted = true
|
||||||
event.accepted = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -702,11 +702,9 @@ AbstractWindow {
|
||||||
id: changeLayoutPanel
|
id: changeLayoutPanel
|
||||||
ChangeLayoutForm {
|
ChangeLayoutForm {
|
||||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Modifier la disposition")
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Modifier la disposition")
|
||||||
Keys.onPressed: (event)=> {
|
Keys.onEscapePressed: (event) => {
|
||||||
if (event.key == Qt.Key_Escape) {
|
rightPanel.visible = false
|
||||||
rightPanel.visible = false
|
event.accepted = true
|
||||||
event.accepted = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
call: mainWindow.call
|
call: mainWindow.call
|
||||||
onChangeLayoutRequested: (index) => {
|
onChangeLayoutRequested: (index) => {
|
||||||
|
|
@ -721,11 +719,9 @@ AbstractWindow {
|
||||||
rightPanel.headerTitleText = qsTr("Liste d'appel")
|
rightPanel.headerTitleText = qsTr("Liste d'appel")
|
||||||
rightPanel.customHeaderButtons = mergeCallPopupButton.createObject(rightPanel)
|
rightPanel.customHeaderButtons = mergeCallPopupButton.createObject(rightPanel)
|
||||||
}
|
}
|
||||||
Keys.onPressed: (event)=> {
|
Keys.onEscapePressed: (event) => {
|
||||||
if (event.key == Qt.Key_Escape) {
|
rightPanel.visible = false
|
||||||
rightPanel.visible = false
|
event.accepted = true
|
||||||
event.accepted = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
spacing: 0
|
spacing: 0
|
||||||
Component {
|
Component {
|
||||||
|
|
@ -784,11 +780,9 @@ AbstractWindow {
|
||||||
Control.StackView.onActivated: {
|
Control.StackView.onActivated: {
|
||||||
rightPanel.headerTitleText = qsTr("Paramètres")
|
rightPanel.headerTitleText = qsTr("Paramètres")
|
||||||
}
|
}
|
||||||
Keys.onPressed: (event)=> {
|
Keys.onEscapePressed: (event) => {
|
||||||
if (event.key == Qt.Key_Escape) {
|
rightPanel.visible = false
|
||||||
rightPanel.visible = false
|
event.accepted = true
|
||||||
event.accepted = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
MultimediaSettings {
|
MultimediaSettings {
|
||||||
id: inSettingsPanel
|
id: inSettingsPanel
|
||||||
|
|
@ -805,11 +799,9 @@ AbstractWindow {
|
||||||
id: screencastPanel
|
id: screencastPanel
|
||||||
Item {
|
Item {
|
||||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Partage de votre écran")
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Partage de votre écran")
|
||||||
Keys.onPressed: (event)=> {
|
Keys.onEscapePressed: (event) => {
|
||||||
if (event.key == Qt.Key_Escape) {
|
rightPanel.visible = false
|
||||||
rightPanel.visible = false
|
event.accepted = true
|
||||||
event.accepted = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ScreencastSettings {
|
ScreencastSettings {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -825,11 +817,9 @@ AbstractWindow {
|
||||||
id: participantListPanel
|
id: participantListPanel
|
||||||
Item {
|
Item {
|
||||||
objectName: "participantListPanel"
|
objectName: "participantListPanel"
|
||||||
Keys.onPressed: (event)=> {
|
Keys.onEscapePressed: (event) => {
|
||||||
if (event.key == Qt.Key_Escape) {
|
rightPanel.visible = false
|
||||||
rightPanel.visible = false
|
event.accepted = true
|
||||||
event.accepted = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Control.StackView {
|
Control.StackView {
|
||||||
id: participantsStack
|
id: participantsStack
|
||||||
|
|
@ -1288,16 +1278,14 @@ AbstractWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuButton {
|
MenuButton {
|
||||||
visible: mainWindow.conference
|
|
||||||
icon.source: AppIcons.fullscreen
|
icon.source: AppIcons.fullscreen
|
||||||
text: qsTr("Mode Plein écran")
|
text: qsTr("Mode Plein écran")
|
||||||
checkable: true
|
checkable: true
|
||||||
|
Binding on checked { value: mainWindow.visibility === Window.FullScreen }
|
||||||
onToggled: {
|
onToggled: {
|
||||||
if(checked) {
|
if(checked) {
|
||||||
DesktopToolsCpp.screenSaverStatus = false
|
|
||||||
mainWindow.showFullScreen()
|
mainWindow.showFullScreen()
|
||||||
}else{
|
}else{
|
||||||
DesktopToolsCpp.screenSaverStatus = true
|
|
||||||
mainWindow.showNormal()
|
mainWindow.showNormal()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue