fix: minimize on close

This commit is contained in:
Richard Ramos 2021-02-22 18:10:47 -04:00 committed by Iuri Matias
parent b43122d7f3
commit fd8a84eb9d
3 changed files with 19 additions and 2 deletions

View File

@ -34,6 +34,15 @@ Item {
onClicked: fleetModal.open() onClicked: fleetModal.open()
} }
StatusSettingsLineButton {
text: qsTr("Minimize on close")
isSwitch: true
switchChecked: !appSettings.quitOnClose
onClicked: function (checked) {
appSettings.quitOnClose = !checked
}
}
Item { Item {
id: spacer1 id: spacer1
height: Style.current.bigPadding height: Style.current.bigPadding

View File

@ -102,6 +102,7 @@ RowLayout {
property int fontSize: Constants.fontSizeM property int fontSize: Constants.fontSizeM
property bool hideSignPhraseModal: false property bool hideSignPhraseModal: false
property bool onlyShowContactsProfilePics: true property bool onlyShowContactsProfilePics: true
property bool quitOnClose: true
// Browser settings // Browser settings
property bool showBrowserSelector: true property bool showBrowserSelector: true

View File

@ -74,8 +74,14 @@ ApplicationWindow {
} }
onClosing: { onClosing: {
applicationWindow.visible = false; if(loader.sourceComponent == app){
close.accepted = false; if(loader.item.appSettings.quitOnClose){
Qt.quit();
} else {
applicationWindow.visible = false;
close.accepted = false;
}
}
} }
Component.onCompleted: { Component.onCompleted: {
@ -234,6 +240,7 @@ ApplicationWindow {
Loader { Loader {
id: loader id: loader
anchors.fill: parent anchors.fill: parent
property var appSettings
} }
Component { Component {