mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2026-02-08 00:32:27 +00:00
Compare commits
16 Commits
feature/ad
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe92fa7330 | ||
|
|
eba69d3a54 | ||
|
|
403bb11e7e | ||
|
|
9f05d729a7 | ||
|
|
25695c0a9f | ||
|
|
b77a1b5962 | ||
|
|
29dc67d96b | ||
|
|
2e4536ecdf | ||
|
|
8cf303132f | ||
|
|
55ef7cb7e0 | ||
|
|
77434e463e | ||
|
|
6bcb54114d | ||
|
|
09f813a7e0 | ||
|
|
a6a7768e42 | ||
|
|
33878dae24 | ||
|
|
0313a00b4f |
49
.github/workflows/build-appimage.yml
vendored
49
.github/workflows/build-appimage.yml
vendored
@@ -1,49 +0,0 @@
|
|||||||
name: Build AppImage
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-appimage:
|
|
||||||
name: Build (Linux, AppImage)
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install build deps
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y build-essential rsync wget
|
|
||||||
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v4
|
|
||||||
with:
|
|
||||||
version: 6.10.0
|
|
||||||
dir: ..
|
|
||||||
modules: qtwayland qtshadertools
|
|
||||||
setup-python: false
|
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: Build AppImage
|
|
||||||
run: |
|
|
||||||
./scripts/build-appimage.sh
|
|
||||||
|
|
||||||
- name: Collect artifact
|
|
||||||
run: |
|
|
||||||
mkdir -p release
|
|
||||||
mv ./*.AppImage release/
|
|
||||||
|
|
||||||
- name: Attestation
|
|
||||||
uses: actions/attest-build-provenance@v1
|
|
||||||
with:
|
|
||||||
subject-path: ./release/*
|
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: cool-retro-term-appimage
|
|
||||||
path: ./release/*
|
|
||||||
44
.github/workflows/build-dmg.yml
vendored
44
.github/workflows/build-dmg.yml
vendored
@@ -1,44 +0,0 @@
|
|||||||
name: Build DMG
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-dmg:
|
|
||||||
name: Build (macOS, DMG)
|
|
||||||
runs-on: macos-14
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v4
|
|
||||||
with:
|
|
||||||
version: 6.10.*
|
|
||||||
modules: qtshadertools
|
|
||||||
setup-python: false
|
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: Build DMG
|
|
||||||
run: |
|
|
||||||
JOBS="$(sysctl -n hw.ncpu)"
|
|
||||||
./scripts/build-dmg.sh
|
|
||||||
|
|
||||||
- name: Collect artifact
|
|
||||||
run: |
|
|
||||||
mkdir -p release
|
|
||||||
mv ./*.dmg release/
|
|
||||||
|
|
||||||
- name: Attestation
|
|
||||||
uses: actions/attest-build-provenance@v1
|
|
||||||
with:
|
|
||||||
subject-path: ./release/*
|
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: cool-retro-term-dmg
|
|
||||||
path: ./release/*
|
|
||||||
129
.github/workflows/release.yml
vendored
Normal file
129
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-appimage:
|
||||||
|
name: Build (Linux, AppImage)
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install build deps
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y build-essential rsync wget
|
||||||
|
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v4
|
||||||
|
with:
|
||||||
|
version: 6.10.0
|
||||||
|
dir: ..
|
||||||
|
modules: qt5compat qtshadertools
|
||||||
|
setup-python: false
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Build AppImage
|
||||||
|
run: |
|
||||||
|
./scripts/build-appimage.sh
|
||||||
|
|
||||||
|
- name: Collect artifact
|
||||||
|
run: |
|
||||||
|
mkdir -p release
|
||||||
|
mv ./*.AppImage release/
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: cool-retro-term-appimage
|
||||||
|
path: ./release/*
|
||||||
|
|
||||||
|
build-dmg:
|
||||||
|
name: Build (macOS, DMG)
|
||||||
|
runs-on: macos-14
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v4
|
||||||
|
with:
|
||||||
|
version: 6.10.*
|
||||||
|
modules: qt5compat qtshadertools
|
||||||
|
setup-python: true
|
||||||
|
python-version: '3.11'
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Build DMG
|
||||||
|
run: |
|
||||||
|
JOBS="$(sysctl -n hw.ncpu)"
|
||||||
|
./scripts/build-dmg.sh
|
||||||
|
|
||||||
|
- name: Collect artifact
|
||||||
|
run: |
|
||||||
|
mkdir -p release
|
||||||
|
mv ./*.dmg release/
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: cool-retro-term-dmg
|
||||||
|
path: ./release/*
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: Create Release
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
needs:
|
||||||
|
- build-appimage
|
||||||
|
- build-dmg
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Download AppImage
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: cool-retro-term-appimage
|
||||||
|
path: ./release
|
||||||
|
|
||||||
|
- name: Download DMG
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: cool-retro-term-dmg
|
||||||
|
path: ./release
|
||||||
|
|
||||||
|
- name: Update rolling tag
|
||||||
|
if: startsWith(github.ref, 'refs/heads/')
|
||||||
|
run: |
|
||||||
|
git tag -f rolling
|
||||||
|
git push -f origin rolling
|
||||||
|
|
||||||
|
- name: Publish rolling release
|
||||||
|
if: startsWith(github.ref, 'refs/heads/')
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: rolling
|
||||||
|
name: Rolling Release
|
||||||
|
prerelease: true
|
||||||
|
files: ./release/*
|
||||||
|
|
||||||
|
- name: Publish tagged release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref_name }}
|
||||||
|
files: ./release/*
|
||||||
@@ -10,7 +10,7 @@ It has been designed to be eye-candy, customizable, and reasonably lightweight.
|
|||||||
|
|
||||||
It uses the QML port of qtermwidget (Konsole): https://github.com/Swordfish90/qmltermwidget.
|
It uses the QML port of qtermwidget (Konsole): https://github.com/Swordfish90/qmltermwidget.
|
||||||
|
|
||||||
This terminal emulator works under Linux and macOS and requires Qt5. It's suggested that you stick to the latest LTS version.
|
This terminal emulator works under Linux and macOS and requires Qt6.
|
||||||
|
|
||||||
Settings such as colors, fonts, and effects can be accessed via context menu.
|
Settings such as colors, fonts, and effects can be accessed via context menu.
|
||||||
|
|
||||||
|
|||||||
@@ -20,15 +20,14 @@
|
|||||||
|
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQml
|
|
||||||
|
|
||||||
import QMLTermWidget 1.0
|
import QMLTermWidget 2.0
|
||||||
|
|
||||||
import "menus"
|
import "menus"
|
||||||
import "utils.js" as Utils
|
import "utils.js" as Utils
|
||||||
|
|
||||||
Item{
|
Item{
|
||||||
id: preprocessedTerminal
|
id: terminalContainer
|
||||||
signal sessionFinished()
|
signal sessionFinished()
|
||||||
|
|
||||||
property size virtualResolution: Qt.size(kterminal.totalWidth, kterminal.totalHeight)
|
property size virtualResolution: Qt.size(kterminal.totalWidth, kterminal.totalHeight)
|
||||||
@@ -48,14 +47,14 @@ Item{
|
|||||||
// Manage copy and paste
|
// Manage copy and paste
|
||||||
Connections {
|
Connections {
|
||||||
target: copyAction
|
target: copyAction
|
||||||
enabled: terminalContainer.hasFocus
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
kterminal.copyClipboard()
|
kterminal.copyClipboard()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: pasteAction
|
target: pasteAction
|
||||||
enabled: terminalContainer.hasFocus
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
kterminal.pasteClipboard()
|
kterminal.pasteClipboard()
|
||||||
}
|
}
|
||||||
@@ -66,22 +65,22 @@ Item{
|
|||||||
target: appSettings
|
target: appSettings
|
||||||
|
|
||||||
onFontScalingChanged: {
|
onFontScalingChanged: {
|
||||||
preprocessedTerminal.updateSources()
|
terminalContainer.updateSources()
|
||||||
}
|
}
|
||||||
|
|
||||||
onFontWidthChanged: {
|
onFontWidthChanged: {
|
||||||
preprocessedTerminal.updateSources()
|
terminalContainer.updateSources()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: preprocessedTerminal
|
target: terminalContainer
|
||||||
|
|
||||||
onWidthChanged: {
|
onWidthChanged: {
|
||||||
preprocessedTerminal.updateSources()
|
terminalContainer.updateSources()
|
||||||
}
|
}
|
||||||
|
|
||||||
onHeightChanged: {
|
onHeightChanged: {
|
||||||
preprocessedTerminal.updateSources()
|
terminalContainer.updateSources()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +118,7 @@ Item{
|
|||||||
id: ksession
|
id: ksession
|
||||||
|
|
||||||
onFinished: {
|
onFinished: {
|
||||||
preprocessedTerminal.sessionFinished()
|
terminalContainer.sessionFinished()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,8 +148,8 @@ Item{
|
|||||||
pixelSize: pixelSize
|
pixelSize: pixelSize
|
||||||
});
|
});
|
||||||
|
|
||||||
preprocessedTerminal.fontWidth = fontWidth;
|
terminalContainer.fontWidth = fontWidth;
|
||||||
preprocessedTerminal.screenScaling = screenScaling;
|
terminalContainer.screenScaling = screenScaling;
|
||||||
scaleTexture = Math.max(1.0, Math.floor(screenScaling * appSettings.windowScaling));
|
scaleTexture = Math.max(1.0, Math.floor(screenScaling * appSettings.windowScaling));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,7 +157,7 @@ Item{
|
|||||||
target: appSettings
|
target: appSettings
|
||||||
|
|
||||||
onWindowScalingChanged: {
|
onWindowScalingChanged: {
|
||||||
scaleTexture = Math.max(1.0, Math.floor(preprocessedTerminal.screenScaling * appSettings.windowScaling));
|
scaleTexture = Math.max(1.0, Math.floor(terminalContainer.screenScaling * appSettings.windowScaling));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,6 +186,9 @@ Item{
|
|||||||
appSettings.fontManager.refresh()
|
appSettings.fontManager.refresh()
|
||||||
startSession();
|
startSession();
|
||||||
}
|
}
|
||||||
|
Component.onDestruction: {
|
||||||
|
appSettings.fontManager.terminalFontChanged.disconnect(handleFontChanged);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
@@ -214,7 +216,7 @@ Item{
|
|||||||
cursorShape: kterminal.terminalUsesMouse ? Qt.ArrowCursor : Qt.IBeamCursor
|
cursorShape: kterminal.terminalUsesMouse ? Qt.ArrowCursor : Qt.IBeamCursor
|
||||||
onWheel: function(wheel) {
|
onWheel: function(wheel) {
|
||||||
if (wheel.modifiers & Qt.ControlModifier) {
|
if (wheel.modifiers & Qt.ControlModifier) {
|
||||||
wheel.angleDelta.y > 0 ? zoomInAction.trigger() : zoomOutAction.trigger();
|
wheel.angleDelta.y > 0 ? zoomIn.trigger() : zoomOut.trigger();
|
||||||
} else {
|
} else {
|
||||||
var coord = correctDistortion(wheel.x, wheel.y);
|
var coord = correctDistortion(wheel.x, wheel.y);
|
||||||
kterminal.simulateWheel(coord.x, coord.y, wheel.buttons, wheel.modifiers, wheel.angleDelta);
|
kterminal.simulateWheel(coord.x, coord.y, wheel.buttons, wheel.modifiers, wheel.angleDelta);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ ColumnLayout {
|
|||||||
GroupBox {
|
GroupBox {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
title: qsTr("Command")
|
title: qsTr("Miscellaneous")
|
||||||
padding: appSettings.defaultMargin
|
padding: appSettings.defaultMargin
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@@ -39,12 +39,6 @@ ColumnLayout {
|
|||||||
checked: appSettings.useCustomCommand
|
checked: appSettings.useCustomCommand
|
||||||
onCheckedChanged: appSettings.useCustomCommand = checked
|
onCheckedChanged: appSettings.useCustomCommand = checked
|
||||||
}
|
}
|
||||||
// Workaround for QTBUG-31627 for pre 5.3.0
|
|
||||||
Binding {
|
|
||||||
target: useCustomCommand
|
|
||||||
property: "checked"
|
|
||||||
value: appSettings.useCustomCommand
|
|
||||||
}
|
|
||||||
TextField {
|
TextField {
|
||||||
id: customCommand
|
id: customCommand
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -59,26 +53,18 @@ ColumnLayout {
|
|||||||
Component.onCompleted: settings_window.closing.connect(
|
Component.onCompleted: settings_window.closing.connect(
|
||||||
saveSetting)
|
saveSetting)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GroupBox {
|
|
||||||
title: qsTr("Cursor")
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
padding: appSettings.defaultMargin
|
|
||||||
ColumnLayout {
|
|
||||||
anchors.fill: parent
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: blinkingCursor
|
id: blinkingCursor
|
||||||
text: qsTr("Blinking Cursor")
|
text: qsTr("Blinking Cursor")
|
||||||
checked: appSettings.blinkingCursor
|
checked: appSettings.blinkingCursor
|
||||||
onCheckedChanged: appSettings.blinkingCursor = checked
|
onCheckedChanged: appSettings.blinkingCursor = checked
|
||||||
}
|
}
|
||||||
Binding {
|
CheckBox {
|
||||||
target: blinkingCursor
|
id: showMenubar
|
||||||
property: "checked"
|
text: qsTr("Show Menubar")
|
||||||
value: appSettings.blinkingCursor
|
enabled: !appSettings.isMacOS
|
||||||
|
checked: appSettings.showMenubar
|
||||||
|
onCheckedChanged: appSettings.showMenubar = checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,15 +21,13 @@ import QtQuick 2.2
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
property size terminalSize
|
property size terminalSize
|
||||||
property real topOpacity: 0.6
|
property real topOpacity: 0.5
|
||||||
|
|
||||||
width: textSize.width * 2
|
width: textSize.width * 2
|
||||||
height: textSize.height * 2
|
height: textSize.height * 2
|
||||||
radius: 5
|
radius: 5
|
||||||
border.width: 2
|
|
||||||
border.color: "white"
|
|
||||||
color: "black"
|
color: "black"
|
||||||
opacity: sizetimer.running ? 0.6 : 0.0
|
opacity: sizetimer.running ? 0.5 : 0.0
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|||||||
@@ -28,13 +28,6 @@ ShaderTerminal {
|
|||||||
signal sessionFinished()
|
signal sessionFinished()
|
||||||
|
|
||||||
property bool loadBloomEffect: appSettings.bloom > 0 || appSettings._frameShininess > 0
|
property bool loadBloomEffect: appSettings.bloom > 0 || appSettings._frameShininess > 0
|
||||||
property bool hasFocus
|
|
||||||
|
|
||||||
onHasFocusChanged: {
|
|
||||||
if (hasFocus) {
|
|
||||||
activate()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
id: mainShader
|
id: mainShader
|
||||||
opacity: appSettings.windowOpacity * 0.3 + 0.7
|
opacity: appSettings.windowOpacity * 0.3 + 0.7
|
||||||
|
|||||||
@@ -20,16 +20,16 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import QtQml.Models
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: tabsRoot
|
id: tabsRoot
|
||||||
|
|
||||||
readonly property int innerPadding: 6
|
readonly property int innerPadding: 6
|
||||||
readonly property string currentTitle: tabsModel.get(currentIndex).title ?? "cool-retro-term"
|
readonly property string currentTitle: tabsModel.get(currentIndex).title ?? "cool-retro-term"
|
||||||
readonly property size terminalSize: stack.currentItem ? stack.currentItem.terminalSize : Qt.size(0, 0)
|
|
||||||
property alias currentIndex: tabBar.currentIndex
|
property alias currentIndex: tabBar.currentIndex
|
||||||
readonly property int count: tabsModel.count
|
readonly property int count: tabsModel.count
|
||||||
property var hostWindow
|
property size terminalSize: Qt.size(0, 0)
|
||||||
|
|
||||||
function normalizeTitle(rawTitle) {
|
function normalizeTitle(rawTitle) {
|
||||||
if (rawTitle === undefined || rawTitle === null) {
|
if (rawTitle === undefined || rawTitle === null) {
|
||||||
@@ -45,7 +45,7 @@ Item {
|
|||||||
|
|
||||||
function closeTab(index) {
|
function closeTab(index) {
|
||||||
if (tabsModel.count <= 1) {
|
if (tabsModel.count <= 1) {
|
||||||
hostWindow.close()
|
terminalWindow.close()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,12 +130,24 @@ Item {
|
|||||||
Repeater {
|
Repeater {
|
||||||
model: tabsModel
|
model: tabsModel
|
||||||
TerminalContainer {
|
TerminalContainer {
|
||||||
id: terminalContainer
|
property bool shouldHaveFocus: terminalWindow.active && StackLayout.isCurrentItem
|
||||||
hasFocus: terminalWindow.active && StackLayout.isCurrentItem
|
onShouldHaveFocusChanged: {
|
||||||
|
if (shouldHaveFocus) {
|
||||||
|
activate()
|
||||||
|
}
|
||||||
|
}
|
||||||
onTitleChanged: tabsModel.setProperty(index, "title", normalizeTitle(title))
|
onTitleChanged: tabsModel.setProperty(index, "title", normalizeTitle(title))
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
onSessionFinished: tabsRoot.closeTab(index)
|
onSessionFinished: tabsRoot.closeTab(index)
|
||||||
|
onTerminalSizeChanged: updateTerminalSize()
|
||||||
|
|
||||||
|
function updateTerminalSize() {
|
||||||
|
// Every tab will have the same size so we can simply take the first one.
|
||||||
|
if (index == 0) {
|
||||||
|
tabsRoot.terminalSize = terminalSize
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
import QtQuick.Window 2.1
|
import QtQuick.Window 2.1
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQml
|
|
||||||
|
|
||||||
import "menus"
|
import "menus"
|
||||||
|
|
||||||
@@ -43,25 +42,7 @@ ApplicationWindow {
|
|||||||
property bool fullscreen: false
|
property bool fullscreen: false
|
||||||
onFullscreenChanged: visibility = (fullscreen ? Window.FullScreen : Window.Windowed)
|
onFullscreenChanged: visibility = (fullscreen ? Window.FullScreen : Window.Windowed)
|
||||||
|
|
||||||
menuBar: qtquickMenuLoader.item
|
menuBar: WindowMenu { }
|
||||||
|
|
||||||
Loader {
|
|
||||||
id: qtquickMenuLoader
|
|
||||||
active: !appSettings.isMacOS && (appSettings.showMenubar && !fullscreen)
|
|
||||||
sourceComponent: WindowMenu { }
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: newTabAction
|
|
||||||
enabled: terminalWindow.active
|
|
||||||
onTriggered: terminalTabs.addTab()
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: fullscreenAction
|
|
||||||
enabled: terminalWindow.active
|
|
||||||
onTriggered: terminalWindow.fullscreen = !terminalWindow.fullscreen
|
|
||||||
}
|
|
||||||
|
|
||||||
property real normalizedWindowScale: 1024 / ((0.5 * width + 0.5 * height))
|
property real normalizedWindowScale: 1024 / ((0.5 * width + 0.5 * height))
|
||||||
|
|
||||||
@@ -69,11 +50,77 @@ ApplicationWindow {
|
|||||||
|
|
||||||
title: terminalTabs.currentTitle
|
title: terminalTabs.currentTitle
|
||||||
|
|
||||||
|
Action {
|
||||||
|
id: fullscreenAction
|
||||||
|
text: qsTr("Fullscreen")
|
||||||
|
enabled: !appSettings.isMacOS
|
||||||
|
shortcut: StandardKey.FullScreen
|
||||||
|
onTriggered: fullscreen = !fullscreen
|
||||||
|
checkable: true
|
||||||
|
checked: fullscreen
|
||||||
|
}
|
||||||
|
Action {
|
||||||
|
id: newWindowAction
|
||||||
|
text: qsTr("New Window")
|
||||||
|
shortcut: appSettings.isMacOS ? "Meta+N" : "Ctrl+Shift+N"
|
||||||
|
onTriggered: appRoot.createWindow()
|
||||||
|
}
|
||||||
|
Action {
|
||||||
|
id: quitAction
|
||||||
|
text: qsTr("Quit")
|
||||||
|
shortcut: appSettings.isMacOS ? StandardKey.Close : "Ctrl+Shift+Q"
|
||||||
|
onTriggered: terminalWindow.close()
|
||||||
|
}
|
||||||
|
Action {
|
||||||
|
id: showsettingsAction
|
||||||
|
text: qsTr("Settings")
|
||||||
|
onTriggered: {
|
||||||
|
settingsWindow.show()
|
||||||
|
settingsWindow.requestActivate()
|
||||||
|
settingsWindow.raise()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Action {
|
||||||
|
id: copyAction
|
||||||
|
text: qsTr("Copy")
|
||||||
|
shortcut: appSettings.isMacOS ? StandardKey.Copy : "Ctrl+Shift+C"
|
||||||
|
}
|
||||||
|
Action {
|
||||||
|
id: pasteAction
|
||||||
|
text: qsTr("Paste")
|
||||||
|
shortcut: appSettings.isMacOS ? StandardKey.Paste : "Ctrl+Shift+V"
|
||||||
|
}
|
||||||
|
Action {
|
||||||
|
id: zoomIn
|
||||||
|
text: qsTr("Zoom In")
|
||||||
|
shortcut: StandardKey.ZoomIn
|
||||||
|
onTriggered: appSettings.incrementScaling()
|
||||||
|
}
|
||||||
|
Action {
|
||||||
|
id: zoomOut
|
||||||
|
text: qsTr("Zoom Out")
|
||||||
|
shortcut: StandardKey.ZoomOut
|
||||||
|
onTriggered: appSettings.decrementScaling()
|
||||||
|
}
|
||||||
|
Action {
|
||||||
|
id: showAboutAction
|
||||||
|
text: qsTr("About")
|
||||||
|
onTriggered: {
|
||||||
|
aboutDialog.show()
|
||||||
|
aboutDialog.requestActivate()
|
||||||
|
aboutDialog.raise()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Action {
|
||||||
|
id: newTabAction
|
||||||
|
text: qsTr("New Tab")
|
||||||
|
shortcut: appSettings.isMacOS ? StandardKey.AddTab : "Ctrl+Shift+T"
|
||||||
|
onTriggered: terminalTabs.addTab()
|
||||||
|
}
|
||||||
TerminalTabs {
|
TerminalTabs {
|
||||||
id: terminalTabs
|
id: terminalTabs
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: (parent.height + Math.abs(y))
|
height: (parent.height + Math.abs(y))
|
||||||
hostWindow: terminalWindow
|
|
||||||
}
|
}
|
||||||
Loader {
|
Loader {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
import QtQuick.Controls 2.3
|
|
||||||
|
|
||||||
import "menus"
|
import "menus"
|
||||||
|
|
||||||
@@ -47,92 +46,12 @@ QtObject {
|
|||||||
|
|
||||||
property ListModel windowsModel: ListModel { }
|
property ListModel windowsModel: ListModel { }
|
||||||
|
|
||||||
property Loader globalMenuLoader: Loader {
|
|
||||||
active: appSettings.isMacOS
|
|
||||||
sourceComponent: OSXMenu { }
|
|
||||||
}
|
|
||||||
|
|
||||||
property Action showMenubarAction: Action {
|
|
||||||
text: qsTr("Show Menubar")
|
|
||||||
enabled: !appSettings.isMacOS
|
|
||||||
shortcut: "Ctrl+Shift+M"
|
|
||||||
checkable: true
|
|
||||||
checked: appSettings.showMenubar
|
|
||||||
onTriggered: appSettings.showMenubar = !appSettings.showMenubar
|
|
||||||
}
|
|
||||||
|
|
||||||
property Action fullscreenAction: Action {
|
|
||||||
text: qsTr("Fullscreen")
|
|
||||||
enabled: !appSettings.isMacOS
|
|
||||||
shortcut: "Alt+F11"
|
|
||||||
}
|
|
||||||
|
|
||||||
property bool initialFullscreenRequested: Qt.application.arguments.indexOf("--fullscreen") !== -1
|
|
||||||
|
|
||||||
property Action newWindowAction: Action {
|
|
||||||
text: qsTr("New Window")
|
|
||||||
shortcut: "Ctrl+Shift+N"
|
|
||||||
onTriggered: appRoot.createWindow()
|
|
||||||
}
|
|
||||||
|
|
||||||
property Action quitAction: Action {
|
|
||||||
text: qsTr("Quit")
|
|
||||||
shortcut: "Ctrl+Shift+Q"
|
|
||||||
onTriggered: appSettings.close()
|
|
||||||
}
|
|
||||||
|
|
||||||
property Action showsettingsAction: Action {
|
|
||||||
text: qsTr("Settings")
|
|
||||||
onTriggered: {
|
|
||||||
settingsWindow.show()
|
|
||||||
settingsWindow.requestActivate()
|
|
||||||
settingsWindow.raise()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
property Action copyAction: Action {
|
|
||||||
text: qsTr("Copy")
|
|
||||||
shortcut: "Ctrl+Shift+C"
|
|
||||||
}
|
|
||||||
|
|
||||||
property Action pasteAction: Action {
|
|
||||||
text: qsTr("Paste")
|
|
||||||
shortcut: "Ctrl+Shift+V"
|
|
||||||
}
|
|
||||||
|
|
||||||
property Action zoomInAction: Action {
|
|
||||||
text: qsTr("Zoom In")
|
|
||||||
shortcut: "Ctrl++"
|
|
||||||
onTriggered: appSettings.incrementScaling()
|
|
||||||
}
|
|
||||||
|
|
||||||
property Action zoomOutAction: Action {
|
|
||||||
text: qsTr("Zoom Out")
|
|
||||||
shortcut: "Ctrl+-"
|
|
||||||
onTriggered: appSettings.decrementScaling()
|
|
||||||
}
|
|
||||||
|
|
||||||
property Action showAboutAction: Action {
|
|
||||||
text: qsTr("About")
|
|
||||||
onTriggered: {
|
|
||||||
aboutDialog.show()
|
|
||||||
aboutDialog.requestActivate()
|
|
||||||
aboutDialog.raise()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
property Action newTabAction: Action {
|
|
||||||
text: qsTr("New Tab")
|
|
||||||
}
|
|
||||||
|
|
||||||
function createWindow() {
|
function createWindow() {
|
||||||
var useFullscreen = initialFullscreenRequested
|
var window = windowComponent.createObject(null)
|
||||||
var window = windowComponent.createObject(null, { fullscreen: useFullscreen })
|
|
||||||
if (!window)
|
if (!window)
|
||||||
return
|
return
|
||||||
|
|
||||||
windowsModel.append({ window: window })
|
windowsModel.append({ window: window })
|
||||||
initialFullscreenRequested = false
|
|
||||||
window.show()
|
window.show()
|
||||||
window.requestActivate()
|
window.requestActivate()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,14 +65,10 @@ Menu {
|
|||||||
visible: fullscreenAction.enabled
|
visible: fullscreenAction.enabled
|
||||||
}
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
action: showMenubarAction
|
action: zoomIn
|
||||||
visible: showMenubarAction.enabled
|
|
||||||
}
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
action: zoomInAction
|
action: zoomOut
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
action: zoomOutAction
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Menu {
|
Menu {
|
||||||
|
|||||||
@@ -1,99 +0,0 @@
|
|||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2013-2021 "Filippo Scognamiglio"
|
|
||||||
* https://github.com/Swordfish90/cool-retro-term
|
|
||||||
*
|
|
||||||
* This file is part of cool-retro-term.
|
|
||||||
*
|
|
||||||
* cool-retro-term is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
import QtQuick 2.3
|
|
||||||
import Qt.labs.platform 1.1
|
|
||||||
|
|
||||||
MenuBar {
|
|
||||||
id: defaultMenuBar
|
|
||||||
|
|
||||||
Menu {
|
|
||||||
title: qsTr("File")
|
|
||||||
MenuItem {
|
|
||||||
text: newWindowAction.text
|
|
||||||
shortcut: newWindowAction.shortcut
|
|
||||||
onTriggered: newWindowAction.trigger()
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
text: newTabAction.text
|
|
||||||
shortcut: newTabAction.shortcut
|
|
||||||
onTriggered: newTabAction.trigger()
|
|
||||||
}
|
|
||||||
MenuSeparator {}
|
|
||||||
MenuItem {
|
|
||||||
text: quitAction.text
|
|
||||||
onTriggered: quitAction.trigger()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Menu {
|
|
||||||
title: qsTr("Edit")
|
|
||||||
MenuItem {
|
|
||||||
text: copyAction.text
|
|
||||||
shortcut: "Meta+C"
|
|
||||||
onTriggered: copyAction.trigger()
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
text: pasteAction.text
|
|
||||||
shortcut: "Meta+V"
|
|
||||||
onTriggered: pasteAction.trigger()
|
|
||||||
}
|
|
||||||
MenuSeparator {}
|
|
||||||
MenuItem {
|
|
||||||
text: showsettingsAction.text
|
|
||||||
shortcut: showsettingsAction.shortcut
|
|
||||||
onTriggered: showsettingsAction.trigger()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Menu {
|
|
||||||
title: qsTr("View")
|
|
||||||
MenuItem {
|
|
||||||
text: zoomInAction.text
|
|
||||||
shortcut: "Meta++"
|
|
||||||
onTriggered: zoomInAction.trigger()
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
text: zoomOutAction.text
|
|
||||||
shortcut: "Meta+-"
|
|
||||||
onTriggered: zoomOutAction.trigger()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Menu {
|
|
||||||
id: profilesMenu
|
|
||||||
title: qsTr("Profiles")
|
|
||||||
Instantiator {
|
|
||||||
model: appSettings.profilesList
|
|
||||||
delegate: MenuItem {
|
|
||||||
text: model.text
|
|
||||||
onTriggered: {
|
|
||||||
appSettings.loadProfileString(obj_string)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onObjectAdded: function(index, object) { profilesMenu.insertItem(index, object) }
|
|
||||||
onObjectRemoved: function(object) { profilesMenu.removeItem(object) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Menu {
|
|
||||||
title: qsTr("Help")
|
|
||||||
MenuItem {
|
|
||||||
text: showAboutAction.text
|
|
||||||
onTriggered: showAboutAction.trigger()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -22,50 +22,33 @@ import QtQuick.Controls 2.3
|
|||||||
|
|
||||||
MenuBar {
|
MenuBar {
|
||||||
id: defaultMenuBar
|
id: defaultMenuBar
|
||||||
visible: appSettings.showMenubar
|
visible: appSettings.isMacOS || appSettings.showMenubar
|
||||||
|
|
||||||
Menu {
|
Menu {
|
||||||
title: qsTr("File")
|
title: qsTr("File")
|
||||||
MenuItem {
|
MenuItem { action: newWindowAction }
|
||||||
action: newWindowAction
|
MenuItem { action: newTabAction }
|
||||||
}
|
MenuSeparator { }
|
||||||
MenuItem {
|
MenuItem { action: quitAction }
|
||||||
action: newTabAction
|
|
||||||
}
|
|
||||||
MenuSeparator {}
|
|
||||||
MenuItem {
|
|
||||||
action: quitAction
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Menu {
|
Menu {
|
||||||
title: qsTr("Edit")
|
title: qsTr("Edit")
|
||||||
MenuItem {
|
MenuItem { action: copyAction }
|
||||||
action: copyAction
|
MenuItem { action: pasteAction }
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
action: pasteAction
|
|
||||||
}
|
|
||||||
MenuSeparator {}
|
MenuSeparator {}
|
||||||
MenuItem {
|
MenuItem { action: showsettingsAction }
|
||||||
action: showsettingsAction
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Menu {
|
Menu {
|
||||||
|
id: viewMenu
|
||||||
title: qsTr("View")
|
title: qsTr("View")
|
||||||
MenuItem {
|
Instantiator {
|
||||||
action: fullscreenAction
|
model: !appSettings.isMacOS ? 1 : 0
|
||||||
visible: fullscreenAction.enabled
|
delegate: MenuItem { action: fullscreenAction }
|
||||||
}
|
onObjectAdded: (index, object) => viewMenu.insertItem(index, object)
|
||||||
MenuItem {
|
onObjectRemoved: (index, object) => viewMenu.removeItem(object)
|
||||||
action: showMenubarAction
|
|
||||||
visible: showMenubarAction.enabled
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
action: zoomInAction
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
action: zoomOutAction
|
|
||||||
}
|
}
|
||||||
|
MenuItem { action: zoomIn }
|
||||||
|
MenuItem { action: zoomOut }
|
||||||
}
|
}
|
||||||
Menu {
|
Menu {
|
||||||
id: profilesMenu
|
id: profilesMenu
|
||||||
|
|||||||
@@ -48,7 +48,6 @@
|
|||||||
<file>menus/WindowMenu.qml</file>
|
<file>menus/WindowMenu.qml</file>
|
||||||
<file>menus/FullContextMenu.qml</file>
|
<file>menus/FullContextMenu.qml</file>
|
||||||
<file>menus/ShortContextMenu.qml</file>
|
<file>menus/ShortContextMenu.qml</file>
|
||||||
<file>menus/OSXMenu.qml</file>
|
|
||||||
<file>../shaders/terminal_dynamic.vert.qsb</file>
|
<file>../shaders/terminal_dynamic.vert.qsb</file>
|
||||||
<file>../shaders/terminal_static.vert.qsb</file>
|
<file>../shaders/terminal_static.vert.qsb</file>
|
||||||
<file>../shaders/terminal_frame.vert.qsb</file>
|
<file>../shaders/terminal_frame.vert.qsb</file>
|
||||||
|
|||||||
Submodule qmltermwidget updated: eef7525edb...d86ebbc396
@@ -6,6 +6,10 @@ REPO_ROOT="$(readlink -f "$(dirname "$(dirname "$0")")")"
|
|||||||
OLD_CWD="$(readlink -f .)"
|
OLD_CWD="$(readlink -f .)"
|
||||||
BUILD_DIR="$REPO_ROOT/build/appimage"
|
BUILD_DIR="$REPO_ROOT/build/appimage"
|
||||||
TOOLS_DIR="$BUILD_DIR/tools"
|
TOOLS_DIR="$BUILD_DIR/tools"
|
||||||
|
VERSION="$(git -C "$REPO_ROOT" describe --tags --always --dirty=-dirty 2>/dev/null || true)"
|
||||||
|
if [ -z "$VERSION" ]; then
|
||||||
|
VERSION="unknown"
|
||||||
|
fi
|
||||||
|
|
||||||
if ! command -v qmake >/dev/null; then
|
if ! command -v qmake >/dev/null; then
|
||||||
echo "qmake not found in PATH." >&2
|
echo "qmake not found in PATH." >&2
|
||||||
@@ -73,5 +77,7 @@ export LINUXDEPLOY_EXCLUDED_LIBRARIES="libmysqlclient.so;libqsqlmimer.so;libqsql
|
|||||||
--plugin qt \
|
--plugin qt \
|
||||||
--output appimage
|
--output appimage
|
||||||
|
|
||||||
mv ./*.AppImage "$OLD_CWD"
|
APPIMAGE_PATH="$(ls -1 ./*.AppImage | head -n 1)"
|
||||||
|
APPIMAGE_OUT="cool-retro-term-${VERSION}.AppImage"
|
||||||
|
mv "$APPIMAGE_PATH" "$OLD_CWD/$APPIMAGE_OUT"
|
||||||
popd
|
popd
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ BUILD_DIR="$REPO_ROOT/build/dmg"
|
|||||||
APP="cool-retro-term.app"
|
APP="cool-retro-term.app"
|
||||||
QML_DIR="$REPO_ROOT/app/qml"
|
QML_DIR="$REPO_ROOT/app/qml"
|
||||||
JOBS="${JOBS:-$(sysctl -n hw.ncpu 2>/dev/null || echo 4)}"
|
JOBS="${JOBS:-$(sysctl -n hw.ncpu 2>/dev/null || echo 4)}"
|
||||||
|
VERSION="$(git -C "$REPO_ROOT" describe --tags --always --dirty=-dirty 2>/dev/null || true)"
|
||||||
|
if [ -z "$VERSION" ]; then
|
||||||
|
VERSION="unknown"
|
||||||
|
fi
|
||||||
|
|
||||||
if ! command -v qmake >/dev/null; then
|
if ! command -v qmake >/dev/null; then
|
||||||
echo "qmake not found in PATH." >&2
|
echo "qmake not found in PATH." >&2
|
||||||
@@ -29,8 +33,15 @@ mkdir -p "$APP/Contents/PlugIns"
|
|||||||
cp -R qmltermwidget/QMLTermWidget "$PLUGIN_DST"
|
cp -R qmltermwidget/QMLTermWidget "$PLUGIN_DST"
|
||||||
|
|
||||||
export QML_IMPORT_PATH="$PWD/$APP/Contents/PlugIns"
|
export QML_IMPORT_PATH="$PWD/$APP/Contents/PlugIns"
|
||||||
"$QT_BIN/macdeployqt" "$APP" -qmldir="$QML_DIR" -dmg
|
"$QT_BIN/macdeployqt" "$APP" -qmldir="$QML_DIR"
|
||||||
|
|
||||||
rm -f "$APP/Contents/PlugIns/sqldrivers/"libqsql{odbc,psql,mimer}.dylib 2>/dev/null || true
|
rm -f "$APP/Contents/PlugIns/sqldrivers/"libqsql{odbc,psql,mimer}.dylib 2>/dev/null || true
|
||||||
mv "$BUILD_DIR/${APP%.app}.dmg" "$OLD_CWD/"
|
|
||||||
|
# Remove stale signatures and ad-hoc sign so Gatekeeper doesn't report corruption.
|
||||||
|
codesign --remove-signature "$APP" 2>/dev/null || true
|
||||||
|
rm -rf "$APP/Contents/_CodeSignature"
|
||||||
|
codesign --force --deep --sign - "$APP"
|
||||||
|
DMG_OUT="${APP%.app}-${VERSION}.dmg"
|
||||||
|
hdiutil create -volname "${APP%.app}" -srcfolder "$APP" -ov -format UDZO "$DMG_OUT"
|
||||||
|
mv "$BUILD_DIR/$DMG_OUT" "$OLD_CWD/$DMG_OUT"
|
||||||
popd
|
popd
|
||||||
|
|||||||
Reference in New Issue
Block a user