diff --git a/app/qml/AboutDialog.qml b/app/qml/AboutDialog.qml index 8520827..3d85b28 100644 --- a/app/qml/AboutDialog.qml +++ b/app/qml/AboutDialog.qml @@ -9,6 +9,8 @@ Window{ width: 600 height: 400 + modality: Qt.ApplicationModal + ColumnLayout{ anchors.fill: parent anchors.margins: 15 diff --git a/app/qml/PreprocessedTerminal.qml b/app/qml/PreprocessedTerminal.qml index 0c28138..91d4035 100644 --- a/app/qml/PreprocessedTerminal.qml +++ b/app/qml/PreprocessedTerminal.qml @@ -114,6 +114,8 @@ Item{ function handleFontChange(fontSource, pixelSize, lineSpacing, screenScaling, fontWidth){ fontLoader.source = fontSource; + + kterminal.antialiasText = appSettings.rasterization === appSettings.no_rasterization font.pixelSize = pixelSize; font.family = fontLoader.name; @@ -141,16 +143,36 @@ Item{ forceActiveFocus(); } } - Menu{ - id: contextmenu - MenuItem{action: copyAction} - MenuItem{action: pasteAction} - MenuSeparator{visible: Qt.platform.os !== "osx"} - MenuItem{action: fullscreenAction; visible: Qt.platform.os !== "osx"} - MenuItem{action: showMenubarAction; visible: Qt.platform.os !== "osx"} - MenuSeparator{visible: !appSettings.showMenubar} - CRTMainMenuBar{visible: !appSettings.showMenubar} + Component { + id: linuxContextMenu + Menu{ + id: contextmenu + MenuItem{action: copyAction} + MenuItem{action: pasteAction} + MenuSeparator{visible: Qt.platform.os !== "osx"} + MenuItem{action: fullscreenAction; visible: Qt.platform.os !== "osx"} + MenuItem{action: showMenubarAction; visible: Qt.platform.os !== "osx"} + MenuSeparator{visible: !appSettings.showMenubar} + CRTMainMenuBar{visible: !appSettings.showMenubar} + } } + Component { + id: osxContextMenu + Menu{ + id: contextmenu + MenuItem{action: copyAction} + MenuItem{action: pasteAction} + MenuSeparator{visible: Qt.platform.os !== "osx"} + MenuItem{action: fullscreenAction; visible: Qt.platform.os !== "osx"} + MenuItem{action: showMenubarAction; visible: Qt.platform.os !== "osx"} + } + } + Loader { + id: menuLoader + sourceComponent: (Qt.platform.os === "osx" ? osxContextMenu : linuxContextMenu) + } + property alias contextmenu: menuLoader.item + MouseArea{ acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton anchors.fill: parent diff --git a/app/qml/main.qml b/app/qml/main.qml index 1310f42..a23d9e2 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -68,12 +68,16 @@ ApplicationWindow{ id: quitAction text: qsTr("Quit") shortcut: "Ctrl+Shift+Q" - onTriggered: terminalWindow.close(); + onTriggered: Qt.quit(); } Action{ id: showsettingsAction text: qsTr("Settings") - onTriggered: settingswindow.show(); + onTriggered: { + settingswindow.show(); + settingswindow.requestActivate(); + settingswindow.raise(); + } } Action{ id: copyAction @@ -102,6 +106,8 @@ ApplicationWindow{ text: qsTr("About") onTriggered: { aboutDialog.show(); + aboutDialog.requestActivate(); + aboutDialog.raise(); } } ApplicationSettings{ @@ -134,4 +140,10 @@ ApplicationWindow{ } } Component.onCompleted: appSettings.handleFontChanged(); + onClosing: { + // OSX Since we are currently supporting only one window + // quit the application when it is closed. + if (Qt.platform.os === "osx") + Qt.quit() + } } diff --git a/qmltermwidget b/qmltermwidget index 71f2f3f..b03e96e 160000 --- a/qmltermwidget +++ b/qmltermwidget @@ -1 +1 @@ -Subproject commit 71f2f3f9f0db5ad42e7b39596e968be110e70267 +Subproject commit b03e96edb5d984040b1816edee8f1f51eadbaff9