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()
}
StatusSettingsLineButton {
text: qsTr("Minimize on close")
isSwitch: true
switchChecked: !appSettings.quitOnClose
onClicked: function (checked) {
appSettings.quitOnClose = !checked
}
}
Item {
id: spacer1
height: Style.current.bigPadding

View File

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

View File

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