fix: minimize on close
This commit is contained in:
parent
b43122d7f3
commit
fd8a84eb9d
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
11
ui/main.qml
11
ui/main.qml
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue