Commit e482fb9e authored by Ronan Abhamon's avatar Ronan Abhamon

fix(ui/views/App/Main/MainWindow): handle closing correctly on mac os

parent 4dcb4309
......@@ -10,9 +10,14 @@ Flickable {
property alias text: textArea.text
readonly property alias length: textArea.length
boundsBehavior: Flickable.StopAtBounds
height: TextAreaFieldStyle.background.height
width: TextAreaFieldStyle.background.width
ScrollBar.vertical: ForceScrollBar {
id: scrollBar
}
TextArea.flickable: TextArea {
id: textArea
......@@ -39,8 +44,4 @@ Flickable {
rightPadding: TextAreaFieldStyle.text.padding + Number(scrollBar.visible) * scrollBar.width
topPadding: TextAreaFieldStyle.text.padding
}
ScrollBar.vertical: ForceScrollBar {
id: scrollBar
}
}
......@@ -16,6 +16,13 @@ function handleActiveFocusItemChanged (activeFocusItem) {
}
}
function handleClosing (close) {
if (Qt.platform.os === 'osx') {
close.accepted = false
window.showMinimized()
}
}
// -----------------------------------------------------------------------------
function lockView (info) {
......
......@@ -54,6 +54,7 @@ ApplicationWindow {
// ---------------------------------------------------------------------------
onActiveFocusItemChanged: Logic.handleActiveFocusItemChanged(activeFocusItem)
onClosing: Logic.handleClosing(close)
// ---------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment