diff --git a/src/qml/Terminal.qml b/src/qml/Terminal.qml index 4a0082c..33feb4f 100644 --- a/src/qml/Terminal.qml +++ b/src/qml/Terminal.qml @@ -21,6 +21,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.5 import QtQuick.Layouts 1.3 +import QtQuick.Window 2.12 import FishUI 1.0 as FishUI import Cutefish.TermWidget 1.0 @@ -209,6 +210,13 @@ Page { onTriggered: Process.openFileManager(_session.currentDir) } + MenuItem { + text: root.isFullScreen ? qsTr("Exit full screen") : qsTr("Full screen") + onTriggered: { + root.visibility = root.isFullScreen ? Window.Windowed : Window.FullScreen + } + } + MenuItem { text: qsTr("Settings") onTriggered: { diff --git a/src/qml/main.qml b/src/qml/main.qml index cacc120..b23dac9 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -62,7 +62,7 @@ FishUI.Window { } onClosing: { - if (!root.isMaximized) { + if (!root.isMaximized && !root.isFullScreen) { settings.width = root.width settings.height = root.height } diff --git a/translations/en_US.ts b/translations/en_US.ts index 2c88838..4766fa5 100644 --- a/translations/en_US.ts +++ b/translations/en_US.ts @@ -50,28 +50,38 @@ Terminal - + Copy - - + + Paste - + Select All - + Open File Manager - + + Exit full screen + + + + + Full screen + + + + Settings diff --git a/translations/zh_CN.ts b/translations/zh_CN.ts index 0c958dc..19ceb1f 100644 --- a/translations/zh_CN.ts +++ b/translations/zh_CN.ts @@ -50,28 +50,38 @@ Terminal - + Copy 复制 - - + + Paste 粘贴 - + Select All 全选 - + Open File Manager 打开文件管理器 - + + Exit full screen + 退出全屏 + + + + Full screen + 全屏 + + + Settings 设置