Compare commits
56 Commits
Author | SHA1 | Date | |
---|---|---|---|
b98408dd32 | |||
36054434a5 | |||
d9e41c27ef | |||
8e8f8e4706 | |||
edb1a6f9e1 | |||
![]() |
33723db314 | ||
4bc440e906 | |||
![]() |
27b248d851 | ||
e3c2e024bb | |||
![]() |
b69610d7f3 | ||
92a768d6f1 | |||
![]() |
5ecd7d754d | ||
![]() |
e3161f64f6 | ||
![]() |
5b0b091ab6 | ||
![]() |
4fdf28fb79 | ||
49213a1cf0 | |||
e30db231f6 | |||
6609c4867f | |||
![]() |
84c5e8bca6 | ||
1a25749315 | |||
![]() |
3852f5995d | ||
9093b7a16e | |||
afead1c2c0 | |||
1b2572f381 | |||
![]() |
27ca6b3f73 | ||
![]() |
f157648d1e | ||
![]() |
d4baaeccfc | ||
![]() |
d412b66c6e | ||
![]() |
74ae511f92 | ||
![]() |
a3fbafe4ae | ||
![]() |
8a45fbe9ed | ||
![]() |
01c7929ee3 | ||
![]() |
2261af17d7 | ||
![]() |
41f34c3992 | ||
![]() |
36b1cd2dde | ||
![]() |
80374b3ec6 | ||
![]() |
bc00d1e45f | ||
![]() |
6ddb507247 | ||
![]() |
b0f3b8f3d0 | ||
![]() |
06e7191056 | ||
![]() |
997131ba64 | ||
![]() |
ef9f412e5f | ||
![]() |
7b69d41c60 | ||
![]() |
552947f507 | ||
![]() |
f69f2df63c | ||
![]() |
aa270067f6 | ||
![]() |
28977313da | ||
![]() |
cfe35d7795 | ||
![]() |
9d06f10a9b | ||
![]() |
8c27f7683b | ||
![]() |
bf1a491789 | ||
![]() |
0f18a0349a | ||
![]() |
39181f42cf | ||
![]() |
3d706ad1a7 | ||
![]() |
a31b77e5bc | ||
![]() |
b417643415 |
4
.github/FUNDING.yml
vendored
Normal file
4
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
patreon: swordfish90
|
||||||
|
custom: ['https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=flscogna%40gmail.com&item_name=Support+CRT¤cy_code=EUR&source=url']
|
98
.github/workflows/appimage.yml
vendored
Normal file
98
.github/workflows/appimage.yml
vendored
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
name: "ci"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: "**"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
appimage:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo add-apt-repository -y ppa:beineri/opt-qt-5.15.2-bionic
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -y \
|
||||||
|
build-essential make wget libgl1-mesa-dev \
|
||||||
|
qt515declarative qt515graphicaleffects \
|
||||||
|
qt515quickcontrols qt515quickcontrols2
|
||||||
|
|
||||||
|
- name: Download QT appimage builder
|
||||||
|
run: |
|
||||||
|
wget -c -O linuxdeployqt.AppImage \
|
||||||
|
https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
|
||||||
|
chmod a+x linuxdeployqt.AppImage
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: |
|
||||||
|
source /opt/qt*/bin/qt*-env.sh && \
|
||||||
|
qmake -v && \
|
||||||
|
qmake CONFIG+=release PREFIX=/usr && \
|
||||||
|
make -j$(nproc)
|
||||||
|
|
||||||
|
- name: Install to appdir
|
||||||
|
run: |
|
||||||
|
source /opt/qt*/bin/qt*-env.sh && \
|
||||||
|
make INSTALL_ROOT=appdir -j$(nproc) install
|
||||||
|
|
||||||
|
- name: Extract version number
|
||||||
|
run: |
|
||||||
|
# Extract version for linuxdeployqt to name the file. Use the tag as
|
||||||
|
# release name but remove prefix.
|
||||||
|
echo "VERSION=$(echo '${{ github.ref }}' | sed 's;.*/;;')" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Build appimage directory
|
||||||
|
run: |
|
||||||
|
mkdir -p \
|
||||||
|
appdir/usr/bin \
|
||||||
|
appdir/usr/lib \
|
||||||
|
appdir/usr/share/applications \
|
||||||
|
appdir/usr/share/metainfo \
|
||||||
|
appdir/usr/share/icons/hicolor/128x128/apps
|
||||||
|
|
||||||
|
cp cool-retro-term appdir/usr/bin/
|
||||||
|
cp cool-retro-term.desktop appdir/usr/share/applications/
|
||||||
|
cp packaging/appdata/cool-retro-term.appdata.xml appdir/usr/share/metainfo/
|
||||||
|
cp app/icons/128x128/cool-retro-term.png appdir/usr/share/icons/hicolor/128x128/apps/
|
||||||
|
cp -r ./app/qml appdir/usr/
|
||||||
|
# Workaround for https://github.com/probonopd/linuxdeployqt/issues/78
|
||||||
|
cp -r ./qmltermwidget/QMLTermWidget appdir/usr/qml/
|
||||||
|
|
||||||
|
find appdir | sort
|
||||||
|
|
||||||
|
- name: Build appimage
|
||||||
|
run: |
|
||||||
|
source /opt/qt*/bin/qt*-env.sh && \
|
||||||
|
./linuxdeployqt.AppImage appdir/usr/share/applications/cool-retro-term.desktop \
|
||||||
|
-verbose=1 -appimage \
|
||||||
|
-qmldir=./app/qml/ \
|
||||||
|
-qmldir=./qmltermwidget/
|
||||||
|
env:
|
||||||
|
# Unset environment variables
|
||||||
|
QTDIR:
|
||||||
|
QT_PLUGIN_PATH:
|
||||||
|
LD_LIBRARY_PATH:
|
||||||
|
|
||||||
|
- name: Upload release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
body: appimage release
|
||||||
|
files: ./**/Cool_Retro_Term-*-x86_64.AppImage
|
||||||
|
|
||||||
|
- name: Clean up
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
find appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
|
||||||
|
make clean
|
||||||
|
rm -rf appdir
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -48,3 +48,6 @@ cool-retro-term
|
|||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.app
|
*.app
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
.idea
|
||||||
|
193
README.md
193
README.md
@ -8,9 +8,9 @@
|
|||||||
cool-retro-term is a terminal emulator which mimics the look and feel of the old cathode tube screens.
|
cool-retro-term is a terminal emulator which mimics the look and feel of the old cathode tube screens.
|
||||||
It has been designed to be eye-candy, customizable, and reasonably lightweight.
|
It has been designed to be eye-candy, customizable, and reasonably lightweight.
|
||||||
|
|
||||||
It uses the QML port of qtermwidget (Konsole) developed by me: 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 Qt 5.2 or higher.
|
This terminal emulator works under Linux and macOS and requires Qt5. It's suggested that you stick to the latest LTS version.
|
||||||
|
|
||||||
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,192 +20,11 @@ Settings such as colors, fonts, and effects can be accessed via context menu.
|
|||||||

|

|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
Walk the easy way and install cool-retro-term using one of these convenient packages:
|
|
||||||
|
|
||||||
Just grab the latest AppImage from the release page and make it executable and run it:
|
If you want to get a hold of the latest version, just go to the Releases page and grab the latest AppImage (Linux) or dmg (macOS).
|
||||||
|
|
||||||
wget https://github.com/Swordfish90/cool-retro-term/releases/download/1.1.1/Cool-Retro-Term-1.1.1-x86_64.AppImage
|
Alternatively, most distributions such as Ubuntu, Fedora or Arch already package cool-retro-term in their official repositories.
|
||||||
chmod a+x Cool-Retro-Term-1.1.1-x86_64.AppImage
|
|
||||||
./Cool-Retro-Term-1.1.1-x86_64.AppImage
|
|
||||||
|
|
||||||
**Fedora** has the `cool-retro-term` in the official repositories. All you have to do is `sudo dnf install cool-retro-term`.
|
## Building
|
||||||
|
|
||||||
Users of **openSUSE** can grab a package from [Open Build Service](http://software.opensuse.org/package/cool-retro-term).
|
Check out the wiki and follow the instructions on how to build it on [Linux](https://github.com/Swordfish90/cool-retro-term/wiki/Build-Instructions-(Linux)) and [macOS](https://github.com/Swordfish90/cool-retro-term/wiki/Build-Instructions-(macOS)).
|
||||||
|
|
||||||
**Arch** users can install this [package](https://aur.archlinux.org/packages/cool-retro-term-git/) directly via the [AUR](https://aur.archlinux.org):
|
|
||||||
|
|
||||||
trizen -S aur/cool-retro-term-git
|
|
||||||
|
|
||||||
or use:
|
|
||||||
|
|
||||||
pacman -S cool-retro-term
|
|
||||||
|
|
||||||
to install precompiled from community repository.
|
|
||||||
|
|
||||||
Users of **Ubuntu 14.04 LTS (Trusty) up to 15.10 (Wily)** can use [this PPA](https://launchpad.net/~bugs-launchpad-net-falkensweb).
|
|
||||||
|
|
||||||
**Ubuntu 17.10** can use [this PPA](https://launchpad.net/%7Evantuz/+archive/ubuntu/cool-retro-term)
|
|
||||||
|
|
||||||
**Solus** users can install using `eopg`:
|
|
||||||
```
|
|
||||||
eopkg it cool-retro-term
|
|
||||||
```
|
|
||||||
|
|
||||||
**macOS** users can grab the latest dmg from the [release page](https://github.com/Swordfish90/cool-retro-term/releases) or install via Homebrew:
|
|
||||||
```
|
|
||||||
brew cask install cool-retro-term
|
|
||||||
```
|
|
||||||
|
|
||||||
**FreeBSD** users can install cool-retro-term with `pkg`:
|
|
||||||
|
|
||||||
pkg install cool-retro-term
|
|
||||||
|
|
||||||
## Build instructions (FreeBSD)
|
|
||||||
|
|
||||||
Grab a copy of [the FreeBSD Ports Collection](https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html), modify [`/usr/ports/x11/cool-retro-term/Makefile`](https://svnweb.freebsd.org/ports/head/x11/cool-retro-term/Makefile?view=markup) as you like, and then run `make install` to build and install the emulator:
|
|
||||||
|
|
||||||
```
|
|
||||||
cd /usr/ports/x11/cool-retro-term
|
|
||||||
make install
|
|
||||||
```
|
|
||||||
|
|
||||||
## Build instructions (Linux)
|
|
||||||
|
|
||||||
Build cool-retro-term yourself, you know, the retro way.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
Make sure to install these first.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Ubuntu 14.04**
|
|
||||||
|
|
||||||
sudo apt-get install build-essential qmlscene qt5-qmake qt5-default qtdeclarative5-dev qtdeclarative5-controls-plugin qtdeclarative5-qtquick2-plugin libqt5qml-graphicaleffects qtdeclarative5-dialogs-plugin qtdeclarative5-localstorage-plugin qtdeclarative5-window-plugin
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Ubuntu 16.10**
|
|
||||||
|
|
||||||
sudo apt-get install build-essential qmlscene qt5-qmake qt5-default qtdeclarative5-dev qml-module-qtquick-controls qtdeclarative5-qtquick2-plugin libqt5qml-graphicaleffects qml-module-qtquick-dialogs qtdeclarative5-localstorage-plugin qtdeclarative5-window-plugin
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Ubuntu 17.04**
|
|
||||||
|
|
||||||
sudo apt install build-essential libqt5qml-graphicaleffects qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings qml-module-qtquick-controls qml-module-qtquick-dialogs qmlscene qt5-default qt5-qmake qtdeclarative5-dev qtdeclarative5-localstorage-plugin qtdeclarative5-qtquick2-plugin qtdeclarative5-window-plugin
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Ubuntu 17.10**
|
|
||||||
|
|
||||||
sudo apt-get install build-essential qml-module-qtgraphicaleffects qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings qml-module-qtquick-controls qml-module-qtquick-dialogs qmlscene qt5-default qt5-qmake qtdeclarative5-dev qtdeclarative5-localstorage-plugin qtdeclarative5-qtquick2-plugin qtdeclarative5-window-plugin
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**snapcraft (most of distros)**
|
|
||||||
|
|
||||||
sudo snap install cool-retro-term --classic
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Debian Jessie and above**
|
|
||||||
|
|
||||||
sudo apt install build-essential qmlscene qt5-qmake qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtgraphicaleffects qml-module-qtquick-dialogs qml-module-qtquick-localstorage qml-module-qtquick-window2 qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Fedora**
|
|
||||||
This command should install the known fedora dependencies:
|
|
||||||
|
|
||||||
sudo yum -y install qt5-qtbase qt5-qtbase-devel qt5-qtdeclarative qt5-qtdeclarative-devel qt5-qtgraphicaleffects qt5-qtquickcontrols redhat-rpm-config
|
|
||||||
|
|
||||||
or:
|
|
||||||
|
|
||||||
sudo dnf -y install qt5-qtbase qt5-qtbase-devel qt5-qtdeclarative qt5-qtdeclarative-devel qt5-qtgraphicaleffects qt5-qtquickcontrols redhat-rpm-config
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Arch Linux**
|
|
||||||
|
|
||||||
sudo pacman -S qt5-base qt5-declarative qt5-quickcontrols qt5-graphicaleffects
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**openSUSE**
|
|
||||||
|
|
||||||
Add repository with latest Qt 5 (this is only needed on openSUSE 13.1, Factory already has it):
|
|
||||||
|
|
||||||
sudo zypper ar http://download.opensuse.org/repositories/KDE:/Qt5/openSUSE_13.1/ KDE:Qt5
|
|
||||||
|
|
||||||
Install dependencies:
|
|
||||||
|
|
||||||
sudo zypper install libqt5-qtbase-devel libqt5-qtdeclarative-devel libqt5-qtquickcontrols libqt5-qtgraphicaleffects
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Anyone else**
|
|
||||||
|
|
||||||
Install Qt directly from here http://qt-project.org/downloads . Once done export them in you path (replace "_/opt/Qt5.3.1/5.3/gcc_64/bin_" with your correct folder):
|
|
||||||
|
|
||||||
export PATH=/opt/Qt5.3.1/5.3/gcc_64/bin/:$PATH
|
|
||||||
---
|
|
||||||
|
|
||||||
### Compile
|
|
||||||
Once you installed all dependencies (Qt is installed and in your path) you need to compile and run the application:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Get it from GitHub
|
|
||||||
git clone --recursive https://github.com/Swordfish90/cool-retro-term.git
|
|
||||||
|
|
||||||
# Build it
|
|
||||||
cd cool-retro-term
|
|
||||||
|
|
||||||
# Compile (Fedora and OpenSUSE user should use qmake-qt5 instead of qmake)
|
|
||||||
qmake && make
|
|
||||||
|
|
||||||
# Have fun!
|
|
||||||
./cool-retro-term
|
|
||||||
```
|
|
||||||
|
|
||||||
## Build instructions (macOS)
|
|
||||||
|
|
||||||
1. Install [Xcode](https://developer.apple.com/xcode/) and agree to the licence agreement
|
|
||||||
2. Enter the following commands into the terminal:
|
|
||||||
|
|
||||||
**Brew**
|
|
||||||
|
|
||||||
```sh
|
|
||||||
brew install qt5
|
|
||||||
git clone --recursive https://github.com/Swordfish90/cool-retro-term.git
|
|
||||||
export CPPFLAGS="-I/usr/local/opt/qt5/include"
|
|
||||||
export LDFLAGS="-L/usr/local/opt/qt5/lib"
|
|
||||||
export PATH=/usr/local/opt/qt5/bin:$PATH
|
|
||||||
cd cool-retro-term
|
|
||||||
qmake && make
|
|
||||||
mkdir cool-retro-term.app/Contents/PlugIns
|
|
||||||
cp -r qmltermwidget/QMLTermWidget cool-retro-term.app/Contents/PlugIns
|
|
||||||
open cool-retro-term.app
|
|
||||||
```
|
|
||||||
|
|
||||||
**MacPorts**
|
|
||||||
|
|
||||||
```sh
|
|
||||||
sudo port install qt5
|
|
||||||
git clone --recursive https://github.com/Swordfish90/cool-retro-term.git
|
|
||||||
cd cool-retro-term
|
|
||||||
/opt/local/libexec/qt5/bin/qmake && make
|
|
||||||
mkdir cool-retro-term.app/Contents/PlugIns
|
|
||||||
cp -r qmltermwidget/QMLTermWidget cool-retro-term.app/Contents/PlugIns
|
|
||||||
open cool-retro-term.app
|
|
||||||
```
|
|
||||||
|
|
||||||
**Homebrew**
|
|
||||||
|
|
||||||
```sh
|
|
||||||
brew cask install cool-retro-term
|
|
||||||
```
|
|
||||||
|
|
||||||
## Donations
|
|
||||||
I made this project in my spare time because I love what I'm doing. If you are enjoying it and you want to buy me a beer click [here](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=flscogna%40gmail%2ecom&lc=IT&item_name=Filippo%20Scognamiglio¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted).
|
|
||||||
|
|
||||||
You can also add "bounties" on your favourite issues. More information on the [Bountysource](https://www.bountysource.com/teams/crt/issues) page.
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
QT += qml quick widgets sql
|
QT += qml quick widgets sql quickcontrols2
|
||||||
TARGET = cool-retro-term
|
TARGET = cool-retro-term
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../
|
DESTDIR = $$OUT_PWD/../
|
||||||
@ -16,7 +16,7 @@ macx:ICON = icons/crt.icns
|
|||||||
RESOURCES += qml/resources.qrc
|
RESOURCES += qml/resources.qrc
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
## INTALLS
|
## INSTALLS
|
||||||
#########################################
|
#########################################
|
||||||
|
|
||||||
target.path += /usr/bin/
|
target.path += /usr/bin/
|
||||||
|
34
app/main.cpp
34
app/main.cpp
@ -6,11 +6,13 @@
|
|||||||
|
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
#include <QQuickStyle>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <QFontDatabase>
|
#include <QFontDatabase>
|
||||||
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
#include <fileio.h>
|
#include <fileio.h>
|
||||||
#include <monospacefontmanager.h>
|
#include <monospacefontmanager.h>
|
||||||
@ -33,6 +35,9 @@ int main(int argc, char *argv[])
|
|||||||
// This disables QT appmenu under Ubuntu, which is not working with QML apps.
|
// This disables QT appmenu under Ubuntu, which is not working with QML apps.
|
||||||
setenv("QT_QPA_PLATFORMTHEME", "", 1);
|
setenv("QT_QPA_PLATFORMTHEME", "", 1);
|
||||||
|
|
||||||
|
// Disable Connections slot warnings
|
||||||
|
QLoggingCategory::setFilterRules("qt.qml.connections.warning=false");
|
||||||
|
|
||||||
#if defined (Q_OS_LINUX)
|
#if defined (Q_OS_LINUX)
|
||||||
setenv("QSG_RENDER_LOOP", "threaded", 0);
|
setenv("QSG_RENDER_LOOP", "threaded", 0);
|
||||||
#endif
|
#endif
|
||||||
@ -44,30 +49,29 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (argc>1 && (!strcmp(argv[1],"-h") || !strcmp(argv[1],"--help"))) {
|
if (argc>1 && (!strcmp(argv[1],"-h") || !strcmp(argv[1],"--help"))) {
|
||||||
QTextStream cout(stdout, QIODevice::WriteOnly);
|
QTextStream cout(stdout, QIODevice::WriteOnly);
|
||||||
cout << "Usage: " << argv[0] << " [--default-settings] [--workdir <dir>] [--program <prog>] [-p|--profile <prof>] [--fullscreen] [-h|--help]" << endl;
|
cout << "Usage: " << argv[0] << " [--default-settings] [--workdir <dir>] [--program <prog>] [-p|--profile <prof>] [--fullscreen] [-h|--help]" << '\n';
|
||||||
cout << " --default-settings Run cool-retro-term with the default settings" << endl;
|
cout << " --default-settings Run cool-retro-term with the default settings" << '\n';
|
||||||
cout << " --workdir <dir> Change working directory to 'dir'" << endl;
|
cout << " --workdir <dir> Change working directory to 'dir'" << '\n';
|
||||||
cout << " -e <cmd> Command to execute. This option will catch all following arguments, so use it as the last option." << endl;
|
cout << " -e <cmd> Command to execute. This option will catch all following arguments, so use it as the last option." << '\n';
|
||||||
cout << " -T <title> Set window title to 'title'." << endl;
|
cout << " -T <title> Set window title to 'title'." << '\n';
|
||||||
cout << " --fullscreen Run cool-retro-term in fullscreen." << endl;
|
cout << " --fullscreen Run cool-retro-term in fullscreen." << '\n';
|
||||||
cout << " -p|--profile <prof> Run cool-retro-term with the given profile." << endl;
|
cout << " -p|--profile <prof> Run cool-retro-term with the given profile." << '\n';
|
||||||
cout << " -h|--help Print this help." << endl;
|
cout << " -h|--help Print this help." << '\n';
|
||||||
cout << " --verbose Print additional information such as profiles and settings." << endl;
|
cout << " --verbose Print additional information such as profiles and settings." << '\n';
|
||||||
|
cout << " -v|--version Print the program name and version." << '\n';
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString appVersion("1.1.1");
|
QString appVersion("1.2.0");
|
||||||
|
|
||||||
if (argc>1 && (!strcmp(argv[1],"-v") || !strcmp(argv[1],"--version"))) {
|
if (argc>1 && (!strcmp(argv[1],"-v") || !strcmp(argv[1],"--version"))) {
|
||||||
QTextStream cout(stdout, QIODevice::WriteOnly);
|
QTextStream cout(stdout, QIODevice::WriteOnly);
|
||||||
cout << "cool-retro-term " << appVersion << endl;
|
cout << "cool-retro-term " << appVersion << '\n';
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
// set application attributes
|
app.setAttribute(Qt::AA_MacDontSwapCtrlAndMeta, true);
|
||||||
// Has no effects, see https://bugreports.qt.io/browse/QTBUG-51293
|
|
||||||
// app.setAttribute(Qt::AA_MacDontSwapCtrlAndMeta, true);
|
|
||||||
|
|
||||||
QQmlApplicationEngine engine;
|
QQmlApplicationEngine engine;
|
||||||
FileIO fileIO;
|
FileIO fileIO;
|
||||||
|
@ -1,39 +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.2
|
|
||||||
|
|
||||||
QtObject {
|
|
||||||
readonly property string version: appVersion
|
|
||||||
readonly property int profileVersion: 2
|
|
||||||
|
|
||||||
readonly property real screenCurvatureSize: 0.4
|
|
||||||
readonly property real minimumFontScaling: 0.25
|
|
||||||
readonly property real maximumFontScaling: 2.50
|
|
||||||
|
|
||||||
readonly property real minBurnInFadeTime: 160
|
|
||||||
readonly property real maxBurnInFadeTime: 1600
|
|
||||||
|
|
||||||
readonly property int no_rasterization: 0
|
|
||||||
readonly property int scanline_rasterization: 1
|
|
||||||
readonly property int pixel_rasterization: 2
|
|
||||||
readonly property int subpixel_rasterization: 3
|
|
||||||
|
|
||||||
readonly property real baseFontScaling: 0.75
|
|
||||||
}
|
|
@ -23,15 +23,27 @@ import QtQuick.Controls 2.0
|
|||||||
import "utils.js" as Utils
|
import "utils.js" as Utils
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
|
readonly property string version: appVersion
|
||||||
|
readonly property int profileVersion: 2
|
||||||
|
|
||||||
// APPLICATION SETTINGS ///////////////////////////////////////////////////////
|
// STATIC CONSTANTS ////////////////////////////////////////////////////////
|
||||||
|
readonly property real screenCurvatureSize: 0.4
|
||||||
|
readonly property real minimumFontScaling: 0.25
|
||||||
|
readonly property real maximumFontScaling: 2.50
|
||||||
|
|
||||||
|
readonly property real minBurnInFadeTime: 160
|
||||||
|
readonly property real maxBurnInFadeTime: 1600
|
||||||
|
|
||||||
|
property bool isMacOS: Qt.platform.os === "osx"
|
||||||
|
|
||||||
|
// GENERAL SETTINGS ///////////////////////////////////////////////////////
|
||||||
property int x: 100
|
property int x: 100
|
||||||
property int y: 100
|
property int y: 100
|
||||||
property int width: 1024
|
property int width: 1024
|
||||||
property int height: 768
|
property int height: 768
|
||||||
|
|
||||||
property bool fullscreen: false
|
property bool fullscreen: false
|
||||||
property bool showMenubar: Qt.platform.os === "osx" ? true : false
|
property bool showMenubar: false
|
||||||
|
|
||||||
property string wintitle: "cool-retro-term"
|
property string wintitle: "cool-retro-term"
|
||||||
|
|
||||||
@ -42,9 +54,9 @@ QtObject {
|
|||||||
property bool verbose: false
|
property bool verbose: false
|
||||||
|
|
||||||
property real bloomQuality: 0.5
|
property real bloomQuality: 0.5
|
||||||
|
|
||||||
property real burnInQuality: 0.5
|
property real burnInQuality: 0.5
|
||||||
property bool useFastBurnIn: Qt.platform.os === "osx" ? false : true
|
|
||||||
|
property bool blinkingCursor: false
|
||||||
|
|
||||||
onWindowScalingChanged: handleFontChanged()
|
onWindowScalingChanged: handleFontChanged()
|
||||||
|
|
||||||
@ -59,6 +71,7 @@ QtObject {
|
|||||||
|
|
||||||
property string _backgroundColor: "#000000"
|
property string _backgroundColor: "#000000"
|
||||||
property string _fontColor: "#ff8100"
|
property string _fontColor: "#ff8100"
|
||||||
|
property string _frameColor: "#ffffff"
|
||||||
property string saturatedColor: Utils.mix(Utils.strToColor("#FFFFFF"),
|
property string saturatedColor: Utils.mix(Utils.strToColor("#FFFFFF"),
|
||||||
Utils.strToColor(_fontColor),
|
Utils.strToColor(_fontColor),
|
||||||
saturationColor * 0.5)
|
saturationColor * 0.5)
|
||||||
@ -69,6 +82,7 @@ QtObject {
|
|||||||
_backgroundColor),
|
_backgroundColor),
|
||||||
Utils.strToColor(saturatedColor),
|
Utils.strToColor(saturatedColor),
|
||||||
0.7 + (contrast * 0.3))
|
0.7 + (contrast * 0.3))
|
||||||
|
property color frameColor: Utils.strToColor(_frameColor)
|
||||||
|
|
||||||
property real staticNoise: 0.12
|
property real staticNoise: 0.12
|
||||||
property real screenCurvature: 0.3
|
property real screenCurvature: 0.3
|
||||||
@ -78,6 +92,7 @@ QtObject {
|
|||||||
|
|
||||||
property real chromaColor: 0.25
|
property real chromaColor: 0.25
|
||||||
property real saturationColor: 0.25
|
property real saturationColor: 0.25
|
||||||
|
property real frameGloss: 0
|
||||||
|
|
||||||
property real jitter: 0.2
|
property real jitter: 0.2
|
||||||
|
|
||||||
@ -94,13 +109,17 @@ QtObject {
|
|||||||
|
|
||||||
property real totalMargin: frameMargin + margin
|
property real totalMargin: frameMargin + margin
|
||||||
|
|
||||||
|
readonly property int no_rasterization: 0
|
||||||
|
readonly property int scanline_rasterization: 1
|
||||||
|
readonly property int pixel_rasterization: 2
|
||||||
|
readonly property int subpixel_rasterization: 3
|
||||||
|
|
||||||
property int rasterization: no_rasterization
|
property int rasterization: no_rasterization
|
||||||
|
|
||||||
property bool blinkingCursor: false
|
|
||||||
|
|
||||||
// FONTS //////////////////////////////////////////////////////////////////
|
// FONTS //////////////////////////////////////////////////////////////////
|
||||||
|
readonly property real baseFontScaling: 0.75
|
||||||
property real fontScaling: 1.0
|
property real fontScaling: 1.0
|
||||||
property real totalFontScaling: appConstants.baseFontScaling * fontScaling
|
property real totalFontScaling: baseFontScaling * fontScaling
|
||||||
|
|
||||||
property real fontWidth: 1.0
|
property real fontWidth: 1.0
|
||||||
|
|
||||||
@ -116,28 +135,28 @@ QtObject {
|
|||||||
property Loader fontManager: Loader {
|
property Loader fontManager: Loader {
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
when: rasterization == appConstants.no_rasterization
|
when: rasterization == no_rasterization
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: fontManager
|
target: fontManager
|
||||||
source: "Fonts.qml"
|
source: "Fonts.qml"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
when: rasterization == appConstants.scanline_rasterization
|
when: rasterization == scanline_rasterization
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: fontManager
|
target: fontManager
|
||||||
source: "FontScanlines.qml"
|
source: "FontScanlines.qml"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
when: rasterization == appConstants.pixel_rasterization
|
when: rasterization == pixel_rasterization
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: fontManager
|
target: fontManager
|
||||||
source: "FontPixels.qml"
|
source: "FontPixels.qml"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
when: rasterization == appConstants.subpixel_rasterization
|
when: rasterization == subpixel_rasterization
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: fontManager
|
target: fontManager
|
||||||
source: "FontPixels.qml"
|
source: "FontPixels.qml"
|
||||||
@ -163,12 +182,12 @@ QtObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function incrementScaling() {
|
function incrementScaling() {
|
||||||
fontScaling = Math.min(fontScaling + 0.05, appConstants.maximumFontScaling)
|
fontScaling = Math.min(fontScaling + 0.05, maximumFontScaling)
|
||||||
handleFontChanged()
|
handleFontChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
function decrementScaling() {
|
function decrementScaling() {
|
||||||
fontScaling = Math.max(fontScaling - 0.05, appConstants.minimumFontScaling)
|
fontScaling = Math.max(fontScaling - 0.05, minimumFontScaling)
|
||||||
handleFontChanged()
|
handleFontChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,8 +245,7 @@ QtObject {
|
|||||||
"bloomQuality": bloomQuality,
|
"bloomQuality": bloomQuality,
|
||||||
"burnInQuality": burnInQuality,
|
"burnInQuality": burnInQuality,
|
||||||
"useCustomCommand": useCustomCommand,
|
"useCustomCommand": useCustomCommand,
|
||||||
"customCommand": customCommand,
|
"customCommand": customCommand
|
||||||
"useFastBurnIn": useFastBurnIn
|
|
||||||
}
|
}
|
||||||
return stringify(settings)
|
return stringify(settings)
|
||||||
}
|
}
|
||||||
@ -236,11 +254,13 @@ QtObject {
|
|||||||
var settings = {
|
var settings = {
|
||||||
"backgroundColor": _backgroundColor,
|
"backgroundColor": _backgroundColor,
|
||||||
"fontColor": _fontColor,
|
"fontColor": _fontColor,
|
||||||
|
"frameColor": _frameColor,
|
||||||
"flickering": flickering,
|
"flickering": flickering,
|
||||||
"horizontalSync": horizontalSync,
|
"horizontalSync": horizontalSync,
|
||||||
"staticNoise": staticNoise,
|
"staticNoise": staticNoise,
|
||||||
"chromaColor": chromaColor,
|
"chromaColor": chromaColor,
|
||||||
"saturationColor": saturationColor,
|
"saturationColor": saturationColor,
|
||||||
|
"frameGloss": frameGloss,
|
||||||
"screenCurvature": screenCurvature,
|
"screenCurvature": screenCurvature,
|
||||||
"glowingLine": glowingLine,
|
"glowingLine": glowingLine,
|
||||||
"burnIn": burnIn,
|
"burnIn": burnIn,
|
||||||
@ -322,9 +342,6 @@ QtObject {
|
|||||||
!== undefined ? settings.useCustomCommand : useCustomCommand
|
!== undefined ? settings.useCustomCommand : useCustomCommand
|
||||||
customCommand = settings.customCommand
|
customCommand = settings.customCommand
|
||||||
!== undefined ? settings.customCommand : customCommand
|
!== undefined ? settings.customCommand : customCommand
|
||||||
|
|
||||||
useFastBurnIn = settings.useFastBurnIn
|
|
||||||
!== undefined ? settings.useFastBurnIn : useFastBurnIn
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadProfileString(profileString) {
|
function loadProfileString(profileString) {
|
||||||
@ -333,6 +350,7 @@ QtObject {
|
|||||||
_backgroundColor = settings.backgroundColor
|
_backgroundColor = settings.backgroundColor
|
||||||
!== undefined ? settings.backgroundColor : _backgroundColor
|
!== undefined ? settings.backgroundColor : _backgroundColor
|
||||||
_fontColor = settings.fontColor !== undefined ? settings.fontColor : _fontColor
|
_fontColor = settings.fontColor !== undefined ? settings.fontColor : _fontColor
|
||||||
|
_frameColor = settings.frameColor !== undefined ? settings.frameColor : _frameColor
|
||||||
|
|
||||||
horizontalSync = settings.horizontalSync
|
horizontalSync = settings.horizontalSync
|
||||||
!== undefined ? settings.horizontalSync : horizontalSync
|
!== undefined ? settings.horizontalSync : horizontalSync
|
||||||
@ -341,6 +359,7 @@ QtObject {
|
|||||||
chromaColor = settings.chromaColor !== undefined ? settings.chromaColor : chromaColor
|
chromaColor = settings.chromaColor !== undefined ? settings.chromaColor : chromaColor
|
||||||
saturationColor = settings.saturationColor
|
saturationColor = settings.saturationColor
|
||||||
!== undefined ? settings.saturationColor : saturationColor
|
!== undefined ? settings.saturationColor : saturationColor
|
||||||
|
frameGloss = settings.frameGloss !== undefined ? settings.frameGloss : frameGloss
|
||||||
screenCurvature = settings.screenCurvature
|
screenCurvature = settings.screenCurvature
|
||||||
!== undefined ? settings.screenCurvature : screenCurvature
|
!== undefined ? settings.screenCurvature : screenCurvature
|
||||||
glowingLine = settings.glowingLine !== undefined ? settings.glowingLine : glowingLine
|
glowingLine = settings.glowingLine !== undefined ? settings.glowingLine : glowingLine
|
||||||
@ -447,6 +466,8 @@ QtObject {
|
|||||||
"rbgShift": 0,
|
"rbgShift": 0,
|
||||||
"saturationColor": 0.2483,
|
"saturationColor": 0.2483,
|
||||||
"screenCurvature": 0.3,
|
"screenCurvature": 0.3,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"frameGloss": 0,
|
||||||
"staticNoise": 0.1198,
|
"staticNoise": 0.1198,
|
||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
@ -476,6 +497,8 @@ QtObject {
|
|||||||
"rbgShift": 0,
|
"rbgShift": 0,
|
||||||
"saturationColor": 0.0,
|
"saturationColor": 0.0,
|
||||||
"screenCurvature": 0.3,
|
"screenCurvature": 0.3,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"frameGloss": 0,
|
||||||
"staticNoise": 0.1198,
|
"staticNoise": 0.1198,
|
||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
@ -505,6 +528,8 @@ QtObject {
|
|||||||
"rbgShift": 0,
|
"rbgShift": 0,
|
||||||
"saturationColor": 0.5,
|
"saturationColor": 0.5,
|
||||||
"screenCurvature": 0.3,
|
"screenCurvature": 0.3,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"frameGloss": 0,
|
||||||
"staticNoise": 0.15,
|
"staticNoise": 0.15,
|
||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
@ -534,6 +559,8 @@ QtObject {
|
|||||||
"rbgShift": 0,
|
"rbgShift": 0,
|
||||||
"saturationColor": 0,
|
"saturationColor": 0,
|
||||||
"screenCurvature": 0,
|
"screenCurvature": 0,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"frameGloss": 0,
|
||||||
"staticNoise": 0.15,
|
"staticNoise": 0.15,
|
||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
@ -563,6 +590,8 @@ QtObject {
|
|||||||
"rbgShift": 0,
|
"rbgShift": 0,
|
||||||
"saturationColor": 0,
|
"saturationColor": 0,
|
||||||
"screenCurvature": 0.5,
|
"screenCurvature": 0.5,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"frameGloss": 0,
|
||||||
"staticNoise": 0.099,
|
"staticNoise": 0.099,
|
||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
@ -592,6 +621,8 @@ QtObject {
|
|||||||
"rbgShift": 0.2969,
|
"rbgShift": 0.2969,
|
||||||
"saturationColor": 0,
|
"saturationColor": 0,
|
||||||
"screenCurvature": 0.5,
|
"screenCurvature": 0.5,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"frameGloss": 0,
|
||||||
"staticNoise": 0.2969,
|
"staticNoise": 0.2969,
|
||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
@ -601,7 +632,7 @@ QtObject {
|
|||||||
builtin: true
|
builtin: true
|
||||||
}
|
}
|
||||||
ListElement {
|
ListElement {
|
||||||
text: "IBM Dos"
|
text: "IBM DOS"
|
||||||
obj_string: '{
|
obj_string: '{
|
||||||
"ambientLight": 0.151,
|
"ambientLight": 0.151,
|
||||||
"backgroundColor": "#000000",
|
"backgroundColor": "#000000",
|
||||||
@ -621,6 +652,8 @@ QtObject {
|
|||||||
"rbgShift": 0.3524,
|
"rbgShift": 0.3524,
|
||||||
"saturationColor": 0,
|
"saturationColor": 0,
|
||||||
"screenCurvature": 0.4,
|
"screenCurvature": 0.4,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"frameGloss": 0,
|
||||||
"staticNoise": 0.0503,
|
"staticNoise": 0.0503,
|
||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
@ -650,6 +683,8 @@ QtObject {
|
|||||||
"rbgShift": 0,
|
"rbgShift": 0,
|
||||||
"saturationColor": 0,
|
"saturationColor": 0,
|
||||||
"screenCurvature": 0.2,
|
"screenCurvature": 0.2,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"frameGloss": 0,
|
||||||
"staticNoise": 0,
|
"staticNoise": 0,
|
||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
@ -679,6 +714,8 @@ QtObject {
|
|||||||
"rbgShift": 0,
|
"rbgShift": 0,
|
||||||
"saturationColor": 0.4983,
|
"saturationColor": 0.4983,
|
||||||
"screenCurvature": 0,
|
"screenCurvature": 0,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"frameGloss": 0,
|
||||||
"staticNoise": 0.0955,
|
"staticNoise": 0.0955,
|
||||||
"windowOpacity": 0.7,
|
"windowOpacity": 0.7,
|
||||||
"margin": 0.1,
|
"margin": 0.1,
|
||||||
|
@ -29,26 +29,29 @@ Loader {
|
|||||||
property real lastUpdate: 0
|
property real lastUpdate: 0
|
||||||
property real prevLastUpdate: 0
|
property real prevLastUpdate: 0
|
||||||
|
|
||||||
property real delay: (1.0 / appSettings.fps) * 1000
|
|
||||||
property real burnIn: appSettings.burnIn
|
property real burnIn: appSettings.burnIn
|
||||||
property real burnInFadeTime: 1 / Utils.lint(_minBurnInFadeTime, _maxBurnInFadeTime, burnIn)
|
property real burnInFadeTime: 1 / Utils.lint(_minBurnInFadeTime, _maxBurnInFadeTime, burnIn)
|
||||||
property real _minBurnInFadeTime: appConstants.minBurnInFadeTime
|
property real _minBurnInFadeTime: appSettings.minBurnInFadeTime
|
||||||
property real _maxBurnInFadeTime: appConstants.maxBurnInFadeTime
|
property real _maxBurnInFadeTime: appSettings.maxBurnInFadeTime
|
||||||
|
|
||||||
active: appSettings.useFastBurnIn && appSettings.burnIn !== 0
|
active: appSettings.burnIn !== 0
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
function completelyUpdate() {
|
function completelyUpdate() {
|
||||||
prevLastUpdate = lastUpdate;
|
let newTime = timeManager.time
|
||||||
lastUpdate = timeManager.time;
|
if (newTime > lastUpdate) {
|
||||||
item.source.scheduleUpdate();
|
prevLastUpdate = lastUpdate
|
||||||
|
lastUpdate = newTime
|
||||||
|
}
|
||||||
|
|
||||||
|
item.source.scheduleUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
function restartBlurSource(){
|
function restartBlurSource() {
|
||||||
prevLastUpdate = timeManager.time;
|
prevLastUpdate = timeManager.time
|
||||||
lastUpdate = prevLastUpdate;
|
lastUpdate = prevLastUpdate
|
||||||
completelyUpdate();
|
completelyUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceComponent: Item {
|
sourceComponent: Item {
|
||||||
@ -72,20 +75,30 @@ Loader {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: kterminal
|
target: kterminal
|
||||||
onImagePainted: completelyUpdate()
|
|
||||||
|
onImagePainted: {
|
||||||
|
completelyUpdate()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Restart blurred source settings change.
|
// Restart blurred source settings change.
|
||||||
Connections{
|
|
||||||
target: appSettings
|
|
||||||
onBurnInChanged: burnInEffect.restartBlurSource();
|
|
||||||
onTerminalFontChanged: burnInEffect.restartBlurSource();
|
|
||||||
onRasterizationChanged: burnInEffect.restartBlurSource();
|
|
||||||
onBurnInQualityChanged: burnInEffect.restartBlurSource();
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: kterminalScrollbar
|
target: appSettings
|
||||||
onOpacityChanged: completelyUpdate()
|
|
||||||
|
onBurnInChanged: {
|
||||||
|
burnInEffect.restartBlurSource()
|
||||||
|
}
|
||||||
|
|
||||||
|
onTerminalFontChanged: {
|
||||||
|
burnInEffect.restartBlurSource()
|
||||||
|
}
|
||||||
|
|
||||||
|
onRasterizationChanged: {
|
||||||
|
burnInEffect.restartBlurSource()
|
||||||
|
}
|
||||||
|
|
||||||
|
onBurnInQualityChanged: {
|
||||||
|
burnInEffect.restartBlurSource()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,10 +34,8 @@ Item {
|
|||||||
visible: false
|
visible: false
|
||||||
|
|
||||||
//This is a workaround to a Qt 5.2 bug.
|
//This is a workaround to a Qt 5.2 bug.
|
||||||
onColorChanged: if (Qt.platform.os !== "osx")
|
onColorChanged: if (!appSettings.isMacOS) colorSelected(color)
|
||||||
colorSelected(color)
|
onAccepted: if (appSettings.isMacOS) colorSelected(color)
|
||||||
onAccepted: if (Qt.platform.os === "osx")
|
|
||||||
colorSelected(color)
|
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -213,7 +213,7 @@ QtObject {
|
|||||||
ListElement {
|
ListElement {
|
||||||
name: "IBM_3278"
|
name: "IBM_3278"
|
||||||
text: "HD: IBM 3278 (1971)"
|
text: "HD: IBM 3278 (1971)"
|
||||||
source: "fonts/1971-ibm-3278/3270Medium.ttf"
|
source: "fonts/1971-ibm-3278/3270-Regular.ttf"
|
||||||
lineSpacing: 0.2
|
lineSpacing: 0.2
|
||||||
pixelSize: 32
|
pixelSize: 32
|
||||||
fontWidth: 1.0
|
fontWidth: 1.0
|
||||||
|
@ -34,7 +34,6 @@ Item{
|
|||||||
|
|
||||||
property ShaderEffectSource mainSource: kterminalSource
|
property ShaderEffectSource mainSource: kterminalSource
|
||||||
property BurnInEffect burnInEffect: burnInEffect
|
property BurnInEffect burnInEffect: burnInEffect
|
||||||
property SlowBurnIn slowBurnInEffect: slowBurnInEffect
|
|
||||||
property real fontWidth: 1.0
|
property real fontWidth: 1.0
|
||||||
property real screenScaling: 1.0
|
property real screenScaling: 1.0
|
||||||
property real scaleTexture: 1.0
|
property real scaleTexture: 1.0
|
||||||
@ -45,28 +44,61 @@ Item{
|
|||||||
property size fontMetrics: kterminal.fontMetrics
|
property size fontMetrics: kterminal.fontMetrics
|
||||||
|
|
||||||
// Manage copy and paste
|
// Manage copy and paste
|
||||||
Connections{
|
Connections {
|
||||||
target: copyAction
|
target: copyAction
|
||||||
onTriggered: kterminal.copyClipboard();
|
|
||||||
|
onTriggered: {
|
||||||
|
kterminal.copyClipboard()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Connections{
|
Connections {
|
||||||
target: pasteAction
|
target: pasteAction
|
||||||
onTriggered: kterminal.pasteClipboard()
|
|
||||||
|
onTriggered: {
|
||||||
|
kterminal.pasteClipboard()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: pasteActionAlt
|
||||||
|
|
||||||
|
onTriggered: {
|
||||||
|
kterminal.pasteSelection()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//When settings are updated sources need to be redrawn.
|
//When settings are updated sources need to be redrawn.
|
||||||
Connections{
|
Connections {
|
||||||
target: appSettings
|
target: appSettings
|
||||||
onFontScalingChanged: terminalContainer.updateSources();
|
|
||||||
onFontWidthChanged: terminalContainer.updateSources();
|
onFontScalingChanged: {
|
||||||
|
terminalContainer.updateSources()
|
||||||
|
}
|
||||||
|
|
||||||
|
onFontWidthChanged: {
|
||||||
|
terminalContainer.updateSources()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Connections{
|
Connections {
|
||||||
target: terminalContainer
|
target: terminalContainer
|
||||||
onWidthChanged: terminalContainer.updateSources();
|
|
||||||
onHeightChanged: terminalContainer.updateSources();
|
onWidthChanged: {
|
||||||
|
terminalContainer.updateSources()
|
||||||
|
}
|
||||||
|
|
||||||
|
onHeightChanged: {
|
||||||
|
terminalContainer.updateSources()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Connections {
|
||||||
|
target: terminalWindow
|
||||||
|
|
||||||
|
onActiveChanged: {
|
||||||
|
kterminal.forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function updateSources() {
|
function updateSources() {
|
||||||
kterminal.update();
|
kterminal.update()
|
||||||
}
|
}
|
||||||
|
|
||||||
QMLTermWidget {
|
QMLTermWidget {
|
||||||
@ -143,7 +175,7 @@ Item{
|
|||||||
var args = Utils.tokenizeCommandLine(appSettings.customCommand);
|
var args = Utils.tokenizeCommandLine(appSettings.customCommand);
|
||||||
ksession.setShellProgram(args[0]);
|
ksession.setShellProgram(args[0]);
|
||||||
ksession.setArgs(args.slice(1));
|
ksession.setArgs(args.slice(1));
|
||||||
} else if (!defaultCmd && Qt.platform.os === "osx") {
|
} else if (!defaultCmd && appSettings.isMacOS) {
|
||||||
// OSX Requires the following default parameters for auto login.
|
// OSX Requires the following default parameters for auto login.
|
||||||
ksession.setArgs(["-i", "-l"]);
|
ksession.setArgs(["-i", "-l"]);
|
||||||
}
|
}
|
||||||
@ -173,7 +205,7 @@ Item{
|
|||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: menuLoader
|
id: menuLoader
|
||||||
sourceComponent: (Qt.platform.os === "osx" || appSettings.showMenubar ? shortContextMenu : fullContextMenu)
|
sourceComponent: (appSettings.isMacOS || appSettings.showMenubar ? shortContextMenu : fullContextMenu)
|
||||||
}
|
}
|
||||||
property alias contextmenu: menuLoader.item
|
property alias contextmenu: menuLoader.item
|
||||||
|
|
||||||
@ -217,7 +249,7 @@ Item{
|
|||||||
y = (y - margin) / height;
|
y = (y - margin) / height;
|
||||||
|
|
||||||
var cc = Qt.size(0.5 - x, 0.5 - y);
|
var cc = Qt.size(0.5 - x, 0.5 - y);
|
||||||
var distortion = (cc.height * cc.height + cc.width * cc.width) * appSettings.screenCurvature * appConstants.screenCurvatureSize;
|
var distortion = (cc.height * cc.height + cc.width * cc.width) * appSettings.screenCurvature * appSettings.screenCurvatureSize;
|
||||||
|
|
||||||
return Qt.point((x - cc.width * (1+distortion) * distortion) * (kterminal.totalWidth),
|
return Qt.point((x - cc.width * (1+distortion) * distortion) * (kterminal.totalWidth),
|
||||||
(y - cc.height * (1+distortion) * distortion) * (kterminal.totalHeight))
|
(y - cc.height * (1+distortion) * distortion) * (kterminal.totalHeight))
|
||||||
@ -250,9 +282,5 @@ Item{
|
|||||||
BurnInEffect {
|
BurnInEffect {
|
||||||
id: burnInEffect
|
id: burnInEffect
|
||||||
}
|
}
|
||||||
|
|
||||||
SlowBurnIn {
|
|
||||||
id: slowBurnInEffect
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
SizedLabel {
|
||||||
text: appSettings.fps !== 0 ? appSettings.fps : qsTr("Max")
|
text: appSettings.fps !== 0 ? appSettings.fps : qsTr("Max")
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
@ -109,7 +109,7 @@ ColumnLayout {
|
|||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Label {
|
SizedLabel {
|
||||||
text: Math.round(txtslider.value * 100) + "%"
|
text: Math.round(txtslider.value * 100) + "%"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ ColumnLayout {
|
|||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Label {
|
SizedLabel {
|
||||||
text: Math.round(bloomSlider.value * 100) + "%"
|
text: Math.round(bloomSlider.value * 100) + "%"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,15 +151,9 @@ ColumnLayout {
|
|||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Label {
|
SizedLabel {
|
||||||
text: Math.round(burnInSlider.value * 100) + "%"
|
text: Math.round(burnInSlider.value * 100) + "%"
|
||||||
}
|
}
|
||||||
CheckBox {
|
|
||||||
Layout.columnSpan: 2
|
|
||||||
text: qsTr("Burnin optimization (might display timing artifacts)")
|
|
||||||
checked: appSettings.useFastBurnIn
|
|
||||||
onCheckedChanged: appSettings.useFastBurnIn = checked
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ ColumnLayout {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
model: appSettings.profilesList
|
model: appSettings.profilesList
|
||||||
|
clip: true
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
width: label.width
|
width: label.width
|
||||||
height: label.height
|
height: label.height
|
||||||
@ -113,7 +114,7 @@ ColumnLayout {
|
|||||||
|
|
||||||
var version = profileObject.version
|
var version = profileObject.version
|
||||||
!== undefined ? profileObject.version : 1
|
!== undefined ? profileObject.version : 1
|
||||||
if (version !== appConstants.profileVersion)
|
if (version !== appSettings.profileVersion)
|
||||||
throw "This profile is not supported on this version of CRT."
|
throw "This profile is not supported on this version of CRT."
|
||||||
|
|
||||||
delete profileObject.name
|
delete profileObject.name
|
||||||
@ -160,7 +161,7 @@ ColumnLayout {
|
|||||||
var profileSettings = JSON.parse(
|
var profileSettings = JSON.parse(
|
||||||
profileObject.obj_string)
|
profileObject.obj_string)
|
||||||
profileSettings["name"] = profileObject.text
|
profileSettings["name"] = profileObject.text
|
||||||
profileSettings["version"] = appConstants.profileVersion
|
profileSettings["version"] = appSettings.profileVersion
|
||||||
|
|
||||||
var result = fileIO.write(url, JSON.stringify(
|
var result = fileIO.write(url, JSON.stringify(
|
||||||
profileSettings,
|
profileSettings,
|
||||||
@ -215,10 +216,12 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
text: qsTr("Opacity")
|
text: qsTr("Opacity")
|
||||||
|
visible: !appSettings.isMacOS
|
||||||
}
|
}
|
||||||
SimpleSlider {
|
SimpleSlider {
|
||||||
onValueChanged: appSettings.windowOpacity = value
|
onValueChanged: appSettings.windowOpacity = value
|
||||||
value: appSettings.windowOpacity
|
value: appSettings.windowOpacity
|
||||||
|
visible: !appSettings.isMacOS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,10 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: appSettings
|
target: appSettings
|
||||||
onTerminalFontChanged: fontChanger.updateIndex()
|
|
||||||
|
onTerminalFontChanged: {
|
||||||
|
fontChanger.updateIndex()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Component.onCompleted: updateIndex()
|
Component.onCompleted: updateIndex()
|
||||||
}
|
}
|
||||||
@ -83,8 +86,8 @@ ColumnLayout {
|
|||||||
onValueChanged: appSettings.fontScaling = value
|
onValueChanged: appSettings.fontScaling = value
|
||||||
value: appSettings.fontScaling
|
value: appSettings.fontScaling
|
||||||
stepSize: 0.05
|
stepSize: 0.05
|
||||||
from: appConstants.minimumFontScaling
|
from: appSettings.minimumFontScaling
|
||||||
to: appConstants.maximumFontScaling
|
to: appSettings.maximumFontScaling
|
||||||
}
|
}
|
||||||
SizedLabel {
|
SizedLabel {
|
||||||
text: Math.round(fontScalingChanger.value * 100) + "%"
|
text: Math.round(fontScalingChanger.value * 100) + "%"
|
||||||
@ -146,6 +149,11 @@ ColumnLayout {
|
|||||||
value: appSettings.saturationColor
|
value: appSettings.saturationColor
|
||||||
enabled: appSettings.chromaColor !== 0
|
enabled: appSettings.chromaColor !== 0
|
||||||
}
|
}
|
||||||
|
CheckableSlider {
|
||||||
|
name: qsTr("Frame Gloss")
|
||||||
|
onNewValue: appSettings.frameGloss = newValue
|
||||||
|
value: appSettings.frameGloss
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@ -163,6 +171,13 @@ ColumnLayout {
|
|||||||
onColorSelected: appSettings._backgroundColor = color
|
onColorSelected: appSettings._backgroundColor = color
|
||||||
color: appSettings._backgroundColor
|
color: appSettings._backgroundColor
|
||||||
}
|
}
|
||||||
|
ColorButton {
|
||||||
|
name: qsTr("Frame")
|
||||||
|
height: 50
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onColorSelected: appSettings._frameColor = color
|
||||||
|
color: appSettings._frameColor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,42 +27,49 @@ import QtQuick.Dialogs 1.1
|
|||||||
Window {
|
Window {
|
||||||
id: settings_window
|
id: settings_window
|
||||||
title: qsTr("Settings")
|
title: qsTr("Settings")
|
||||||
width: 800
|
width: 640
|
||||||
height: 600
|
height: 640
|
||||||
|
|
||||||
property int tabmargins: 15
|
property int tabmargins: 15
|
||||||
|
|
||||||
TabBar {
|
Item {
|
||||||
id: bar
|
anchors { fill: parent; margins: tabmargins }
|
||||||
width: parent.width
|
|
||||||
TabButton {
|
|
||||||
text: qsTr("General")
|
|
||||||
}
|
|
||||||
TabButton {
|
|
||||||
text: qsTr("Terminal")
|
|
||||||
}
|
|
||||||
TabButton {
|
|
||||||
text: qsTr("Effects")
|
|
||||||
}
|
|
||||||
TabButton {
|
|
||||||
text: qsTr("Advanced")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StackLayout {
|
TabBar {
|
||||||
anchors {
|
id: bar
|
||||||
top: bar.bottom
|
anchors { left: parent.left; right: parent.right; top: parent.top; }
|
||||||
left: parent.left
|
TabButton {
|
||||||
right: parent.right
|
text: qsTr("General")
|
||||||
bottom: parent.bottom
|
}
|
||||||
margins: tabmargins
|
TabButton {
|
||||||
|
text: qsTr("Terminal")
|
||||||
|
}
|
||||||
|
TabButton {
|
||||||
|
text: qsTr("Effects")
|
||||||
|
}
|
||||||
|
TabButton {
|
||||||
|
text: qsTr("Advanced")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
currentIndex: bar.currentIndex
|
Frame {
|
||||||
|
anchors {
|
||||||
|
top: bar.bottom
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
bottom: parent.bottom
|
||||||
|
}
|
||||||
|
|
||||||
SettingsGeneralTab { }
|
StackLayout {
|
||||||
SettingsTerminalTab { }
|
anchors.fill: parent
|
||||||
SettingsEffectsTab { }
|
|
||||||
SettingsAdvancedTab { }
|
currentIndex: bar.currentIndex
|
||||||
|
|
||||||
|
SettingsGeneralTab { }
|
||||||
|
SettingsTerminalTab { }
|
||||||
|
SettingsEffectsTab { }
|
||||||
|
SettingsAdvancedTab { }
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,12 @@ import QtQuick 2.0
|
|||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
property string rasterizationShader:
|
property string rasterizationShader:
|
||||||
(appSettings.rasterization === appConstants.no_rasterization ? "
|
(appSettings.rasterization === appSettings.no_rasterization ? "
|
||||||
lowp vec3 applyRasterization(vec2 screenCoords, lowp vec3 texel, vec2 virtualResolution, float intensity) {
|
lowp vec3 applyRasterization(vec2 screenCoords, lowp vec3 texel, vec2 virtualResolution, float intensity) {
|
||||||
return texel;
|
return texel;
|
||||||
}" : "") +
|
}" : "") +
|
||||||
|
|
||||||
(appSettings.rasterization === appConstants.scanline_rasterization ? "
|
(appSettings.rasterization === appSettings.scanline_rasterization ? "
|
||||||
#define INTENSITY 0.30
|
#define INTENSITY 0.30
|
||||||
#define BRIGHTBOOST 0.30
|
#define BRIGHTBOOST 0.30
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ QtObject {
|
|||||||
return mix(texel, rasterizationColor, intensity);
|
return mix(texel, rasterizationColor, intensity);
|
||||||
}" : "") +
|
}" : "") +
|
||||||
|
|
||||||
(appSettings.rasterization === appConstants.pixel_rasterization ? "
|
(appSettings.rasterization === appSettings.pixel_rasterization ? "
|
||||||
#define INTENSITY 0.30
|
#define INTENSITY 0.30
|
||||||
#define BRIGHTBOOST 0.30
|
#define BRIGHTBOOST 0.30
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ QtObject {
|
|||||||
return mix(texel, rasterizationColor, intensity);
|
return mix(texel, rasterizationColor, intensity);
|
||||||
}" : "") +
|
}" : "") +
|
||||||
|
|
||||||
(appSettings.rasterization === appConstants.subpixel_rasterization ? "
|
(appSettings.rasterization === appSettings.subpixel_rasterization ? "
|
||||||
#define INTENSITY 0.30
|
#define INTENSITY 0.30
|
||||||
#define BRIGHTBOOST 0.30
|
#define BRIGHTBOOST 0.30
|
||||||
#define SUBPIXELS 3.0
|
#define SUBPIXELS 3.0
|
||||||
|
@ -24,7 +24,6 @@ import QtGraphicalEffects 1.0
|
|||||||
import "utils.js" as Utils
|
import "utils.js" as Utils
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
property SlowBurnIn slowBurnInEffect
|
|
||||||
property ShaderEffectSource source
|
property ShaderEffectSource source
|
||||||
property BurnInEffect burnInEffect
|
property BurnInEffect burnInEffect
|
||||||
property ShaderEffectSource bloomSource
|
property ShaderEffectSource bloomSource
|
||||||
@ -32,12 +31,14 @@ Item {
|
|||||||
property color fontColor: appSettings.fontColor
|
property color fontColor: appSettings.fontColor
|
||||||
property color backgroundColor: appSettings.backgroundColor
|
property color backgroundColor: appSettings.backgroundColor
|
||||||
|
|
||||||
property real screenCurvature: appSettings.screenCurvature * appConstants.screenCurvatureSize
|
property real screenCurvature: appSettings.screenCurvature * appSettings.screenCurvatureSize
|
||||||
|
|
||||||
property real chromaColor: appSettings.chromaColor
|
property real chromaColor: appSettings.chromaColor
|
||||||
|
|
||||||
property real ambientLight: appSettings.ambientLight * 0.2
|
property real ambientLight: appSettings.ambientLight * 0.2
|
||||||
|
|
||||||
|
property real frameGloss: appSettings.frameGloss
|
||||||
|
|
||||||
property size virtualResolution
|
property size virtualResolution
|
||||||
property size screenResolution
|
property size screenResolution
|
||||||
|
|
||||||
@ -60,6 +61,7 @@ Item {
|
|||||||
property real screenCurvature: parent.screenCurvature
|
property real screenCurvature: parent.screenCurvature
|
||||||
property real chromaColor: parent.chromaColor
|
property real chromaColor: parent.chromaColor
|
||||||
property real ambientLight: parent.ambientLight
|
property real ambientLight: parent.ambientLight
|
||||||
|
property real frameGloss: parent.frameGloss
|
||||||
|
|
||||||
property real flickering: appSettings.flickering
|
property real flickering: appSettings.flickering
|
||||||
property real horizontalSync: appSettings.horizontalSync
|
property real horizontalSync: appSettings.horizontalSync
|
||||||
@ -67,14 +69,10 @@ Item {
|
|||||||
property real glowingLine: appSettings.glowingLine * 0.2
|
property real glowingLine: appSettings.glowingLine * 0.2
|
||||||
|
|
||||||
// Fast burnin properties
|
// Fast burnin properties
|
||||||
property real burnIn: appSettings.useFastBurnIn ? appSettings.burnIn : 0
|
property real burnIn: appSettings.burnIn
|
||||||
property real burnInLastUpdate: burnInEffect.lastUpdate
|
property real burnInLastUpdate: burnInEffect.lastUpdate
|
||||||
property real burnInTime: burnInEffect.burnInFadeTime
|
property real burnInTime: burnInEffect.burnInFadeTime
|
||||||
|
|
||||||
// Slow burnin properties
|
|
||||||
property real slowBurnIn: appSettings.useFastBurnIn ? 0 : appSettings.burnIn
|
|
||||||
property ShaderEffectSource slowBurnInSource: slowBurnInEffect.source
|
|
||||||
|
|
||||||
property real jitter: appSettings.jitter
|
property real jitter: appSettings.jitter
|
||||||
property size jitterDisplacement: Qt.size(0.007 * jitter, 0.002 * jitter)
|
property size jitterDisplacement: Qt.size(0.007 * jitter, 0.002 * jitter)
|
||||||
property real shadowLength: 0.25 * screenCurvature * Utils.lint(0.50, 1.5, ambientLight)
|
property real shadowLength: 0.25 * screenCurvature * Utils.lint(0.50, 1.5, ambientLight)
|
||||||
@ -177,6 +175,7 @@ Item {
|
|||||||
uniform highp vec4 fontColor;
|
uniform highp vec4 fontColor;
|
||||||
uniform highp vec4 backgroundColor;
|
uniform highp vec4 backgroundColor;
|
||||||
uniform lowp float shadowLength;
|
uniform lowp float shadowLength;
|
||||||
|
uniform lowp float frameGloss;
|
||||||
|
|
||||||
uniform highp vec2 virtualResolution;
|
uniform highp vec2 virtualResolution;
|
||||||
uniform lowp float rasterizationIntensity;\n" +
|
uniform lowp float rasterizationIntensity;\n" +
|
||||||
@ -185,8 +184,6 @@ Item {
|
|||||||
uniform sampler2D burnInSource;
|
uniform sampler2D burnInSource;
|
||||||
uniform highp float burnInLastUpdate;
|
uniform highp float burnInLastUpdate;
|
||||||
uniform highp float burnInTime;" : "") +
|
uniform highp float burnInTime;" : "") +
|
||||||
(slowBurnIn !== 0 ? "
|
|
||||||
uniform sampler2D slowBurnInSource;" : "") +
|
|
||||||
(staticNoise !== 0 ? "
|
(staticNoise !== 0 ? "
|
||||||
uniform highp float staticNoise;" : "") +
|
uniform highp float staticNoise;" : "") +
|
||||||
(((staticNoise !== 0 || jitter !== 0) ||(fallBack && (flickering || horizontalSync))) ? "
|
(((staticNoise !== 0 || jitter !== 0) ||(fallBack && (flickering || horizontalSync))) ? "
|
||||||
@ -250,6 +247,17 @@ Item {
|
|||||||
" return outColor;
|
" return outColor;
|
||||||
}" +
|
}" +
|
||||||
|
|
||||||
|
//pseudo-random vector
|
||||||
|
//https://stackoverflow.com/a/10625698
|
||||||
|
"float random( vec2 p )
|
||||||
|
{
|
||||||
|
vec2 K1 = vec2(
|
||||||
|
23.14069263277926, // e^pi (Gelfond's constant)
|
||||||
|
2.665144142690225 // 2^sqrt(2) (Gelfond-Schneider constant)
|
||||||
|
);
|
||||||
|
return fract( cos( dot(p,K1) ) * 12345.6789 );
|
||||||
|
}" +
|
||||||
|
|
||||||
"void main() {" +
|
"void main() {" +
|
||||||
"vec2 cc = vec2(0.5) - qt_TexCoord0;" +
|
"vec2 cc = vec2(0.5) - qt_TexCoord0;" +
|
||||||
"float distance = length(cc);" +
|
"float distance = length(cc);" +
|
||||||
@ -288,7 +296,11 @@ Item {
|
|||||||
: "") +
|
: "") +
|
||||||
|
|
||||||
(jitter !== 0 || staticNoise !== 0 ?
|
(jitter !== 0 || staticNoise !== 0 ?
|
||||||
"vec4 noiseTexel = texture2D(noiseSource, scaleNoiseSize * coords + vec2(fract(time / 51.0), fract(time / 237.0)));"
|
"vec4 noiseTexel = texture2D(
|
||||||
|
noiseSource, scaleNoiseSize * coords
|
||||||
|
+ vec2(0.0, random(vec2(fract(time / 237.0), 822.9582)))
|
||||||
|
+ vec2(fract(time / 31.0), fract(time / 177.0))
|
||||||
|
);"
|
||||||
: "") +
|
: "") +
|
||||||
|
|
||||||
(jitter !== 0 ? "
|
(jitter !== 0 ? "
|
||||||
@ -314,11 +326,6 @@ Item {
|
|||||||
txt_color = max(txt_color, convertWithChroma(burnInColor));"
|
txt_color = max(txt_color, convertWithChroma(burnInColor));"
|
||||||
: "") +
|
: "") +
|
||||||
|
|
||||||
(slowBurnIn !== 0 ? "
|
|
||||||
vec4 txt_blur = texture2D(slowBurnInSource, staticCoords);
|
|
||||||
txt_color = max(txt_color, convertWithChroma(txt_blur.rgb * txt_blur.a));
|
|
||||||
" : "") +
|
|
||||||
|
|
||||||
"txt_color += fontColor.rgb * vec3(color);" +
|
"txt_color += fontColor.rgb * vec3(color);" +
|
||||||
|
|
||||||
"txt_color = applyRasterization(staticCoords, txt_color, virtualResolution, rasterizationIntensity);\n" +
|
"txt_color = applyRasterization(staticCoords, txt_color, virtualResolution, rasterizationIntensity);\n" +
|
||||||
@ -333,7 +340,7 @@ Item {
|
|||||||
|
|
||||||
(displayTerminalFrame ?
|
(displayTerminalFrame ?
|
||||||
"vec4 frameColor = texture2D(frameSource, qt_TexCoord0);
|
"vec4 frameColor = texture2D(frameSource, qt_TexCoord0);
|
||||||
finalColor = mix(finalColor, frameColor.rgb, frameColor.a);"
|
finalColor = mix(finalColor, frameColor.rgb + (finalColor*frameGloss), frameColor.a);"
|
||||||
: "") +
|
: "") +
|
||||||
|
|
||||||
"gl_FragColor = vec4(finalColor, qt_Opacity);" +
|
"gl_FragColor = vec4(finalColor, qt_Opacity);" +
|
||||||
|
@ -1,140 +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.0
|
|
||||||
|
|
||||||
import "utils.js" as Utils
|
|
||||||
|
|
||||||
Loader {
|
|
||||||
property ShaderEffectSource source: item ? item.source : null
|
|
||||||
|
|
||||||
active: !appSettings.useFastBurnIn && appSettings.burnIn !== 0
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
sourceComponent: Item {
|
|
||||||
property alias source: burnInSourceEffect
|
|
||||||
property int burnInScaling: scaleTexture * appSettings.burnInQuality
|
|
||||||
|
|
||||||
ShaderEffectSource {
|
|
||||||
property bool updateBurnIn: false
|
|
||||||
property real burnIn: appSettings.burnIn
|
|
||||||
property real fps: appSettings.fps !== 0 ? appSettings.fps : 60
|
|
||||||
property real burnInFadeTime: Utils.lint(minBurnInFadeTime, maxBurnInFadeTime, burnIn)
|
|
||||||
property real burnInCoefficient: 1000 / (fps * burnInFadeTime)
|
|
||||||
property real minBurnInFadeTime: appConstants.minBurnInFadeTime
|
|
||||||
property real maxBurnInFadeTime: appConstants.maxBurnInFadeTime
|
|
||||||
|
|
||||||
id: burnInSourceEffect
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
sourceItem: burnInEffect
|
|
||||||
recursive: true
|
|
||||||
live: false
|
|
||||||
hideSource: true
|
|
||||||
wrapMode: kterminalSource.wrapMode
|
|
||||||
|
|
||||||
visible: false
|
|
||||||
|
|
||||||
function restartBlurSource(){
|
|
||||||
livetimer.restart();
|
|
||||||
}
|
|
||||||
|
|
||||||
// This updates the burnin synched with the timer.
|
|
||||||
Connections {
|
|
||||||
target: burnInSourceEffect.updateBurnIn ? timeManager : null
|
|
||||||
ignoreUnknownSignals: false
|
|
||||||
onTimeChanged: {
|
|
||||||
burnInSourceEffect.scheduleUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: livetimer
|
|
||||||
|
|
||||||
// The interval assumes 60 fps. This is the time needed burnout a white pixel.
|
|
||||||
// We multiply 1.1 to have a little bit of margin over the theoretical value.
|
|
||||||
// This solution is not extremely clean, but it's probably the best to avoid measuring fps.
|
|
||||||
|
|
||||||
interval: burnInSourceEffect.burnInFadeTime * 1.1
|
|
||||||
running: true
|
|
||||||
onTriggered: burnInSourceEffect.updateBurnIn = false;
|
|
||||||
}
|
|
||||||
Connections {
|
|
||||||
target: kterminal
|
|
||||||
onImagePainted:{
|
|
||||||
burnInSourceEffect.scheduleUpdate();
|
|
||||||
burnInSourceEffect.updateBurnIn = true;
|
|
||||||
livetimer.restart();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Restart blurred source settings change.
|
|
||||||
Connections {
|
|
||||||
target: appSettings
|
|
||||||
onBurnInChanged: burnInSourceEffect.restartBlurSource();
|
|
||||||
onTerminalFontChanged: burnInSourceEffect.restartBlurSource();
|
|
||||||
onRasterizationChanged: burnInSourceEffect.restartBlurSource();
|
|
||||||
onBurnInQualityChanged: burnInSourceEffect.restartBlurSource();
|
|
||||||
}
|
|
||||||
Connections {
|
|
||||||
target: kterminalScrollbar
|
|
||||||
onOpacityChanged: burnInSourceEffect.restartBlurSource();
|
|
||||||
}
|
|
||||||
|
|
||||||
ShaderEffect {
|
|
||||||
id: burnInEffect
|
|
||||||
|
|
||||||
property variant txt_source: kterminalSource
|
|
||||||
property variant blurredSource: burnInSourceEffect
|
|
||||||
property real burnInCoefficient: burnInSourceEffect.burnInCoefficient
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
blending: false
|
|
||||||
|
|
||||||
fragmentShader:
|
|
||||||
"#ifdef GL_ES
|
|
||||||
precision mediump float;
|
|
||||||
#endif\n" +
|
|
||||||
|
|
||||||
"uniform lowp float qt_Opacity;" +
|
|
||||||
"uniform lowp sampler2D txt_source;" +
|
|
||||||
|
|
||||||
"varying highp vec2 qt_TexCoord0;
|
|
||||||
uniform lowp sampler2D blurredSource;
|
|
||||||
uniform highp float burnInCoefficient;" +
|
|
||||||
|
|
||||||
"float max3(vec3 v) {
|
|
||||||
return max (max (v.x, v.y), v.z);
|
|
||||||
}" +
|
|
||||||
|
|
||||||
"void main() {" +
|
|
||||||
"vec2 coords = qt_TexCoord0;" +
|
|
||||||
"vec3 origColor = texture2D(txt_source, coords).rgb;" +
|
|
||||||
"vec3 blur_color = texture2D(blurredSource, coords).rgb - vec3(burnInCoefficient);" +
|
|
||||||
"vec3 color = min(origColor + blur_color, max(origColor, blur_color));" +
|
|
||||||
|
|
||||||
"gl_FragColor = vec4(color, max3(color - origColor));" +
|
|
||||||
"}"
|
|
||||||
|
|
||||||
onStatusChanged: if (log) console.log(log) //Print warning messages
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -33,7 +33,6 @@ ShaderTerminal {
|
|||||||
|
|
||||||
source: terminal.mainSource
|
source: terminal.mainSource
|
||||||
burnInEffect: terminal.burnInEffect
|
burnInEffect: terminal.burnInEffect
|
||||||
slowBurnInEffect: terminal.slowBurnInEffect
|
|
||||||
virtualResolution: terminal.virtualResolution
|
virtualResolution: terminal.virtualResolution
|
||||||
screenResolution: Qt.size(
|
screenResolution: Qt.size(
|
||||||
terminalWindow.width * devicePixelRatio * appSettings.windowScaling,
|
terminalWindow.width * devicePixelRatio * appSettings.windowScaling,
|
||||||
|
@ -22,14 +22,14 @@ import QtQuick 2.0
|
|||||||
import "utils.js" as Utils
|
import "utils.js" as Utils
|
||||||
|
|
||||||
ShaderEffect {
|
ShaderEffect {
|
||||||
property color _staticFrameColor: "#fff"
|
property color _frameColor: appSettings.frameColor
|
||||||
property color _backgroundColor: appSettings.backgroundColor
|
property color _backgroundColor: appSettings.backgroundColor
|
||||||
property color _fontColor: appSettings.fontColor
|
property color _fontColor: appSettings.fontColor
|
||||||
property color _lightColor: Utils.mix(_fontColor, _backgroundColor, 0.2)
|
property color _lightColor: Utils.mix(_fontColor, _backgroundColor, 0.2)
|
||||||
property real _ambientLight: Utils.lint(0.2, 0.8, appSettings.ambientLight)
|
property real _ambientLight: Utils.lint(0.2, 0.8, appSettings.ambientLight)
|
||||||
|
|
||||||
property color frameColor: Utils.mix(_staticFrameColor, _lightColor, _ambientLight)
|
property color frameColor: Utils.mix(_frameColor, _lightColor, _ambientLight)
|
||||||
property real screenCurvature: appSettings.screenCurvature * appConstants.screenCurvatureSize
|
property real screenCurvature: appSettings.screenCurvature * appSettings.screenCurvatureSize
|
||||||
|
|
||||||
// Coefficient of the log curve used to approximate shadowing
|
// Coefficient of the log curve used to approximate shadowing
|
||||||
property real screenShadowCoeff: Utils.lint(20.0, 10.0, _ambientLight)
|
property real screenShadowCoeff: Utils.lint(20.0, 10.0, _ambientLight)
|
||||||
@ -87,7 +87,7 @@ ShaderEffect {
|
|||||||
float alpha = 0.0;
|
float alpha = 0.0;
|
||||||
|
|
||||||
float frameShadow = max2(positiveLog(-coords * frameShadowCoeff + vec2(1.0)) + positiveLog(coords * frameShadowCoeff - (vec2(frameShadowCoeff) - vec2(1.0))));
|
float frameShadow = max2(positiveLog(-coords * frameShadowCoeff + vec2(1.0)) + positiveLog(coords * frameShadowCoeff - (vec2(frameShadowCoeff) - vec2(1.0))));
|
||||||
frameShadow = max(sqrt(frameShadow), 0.0);
|
frameShadow = clamp(sqrt(frameShadow), 0.0, 1.0);
|
||||||
color *= frameShadow;
|
color *= frameShadow;
|
||||||
alpha = sum2(1.0 - step(vec2(0.0), coords) + step(vec2(1.0), coords));
|
alpha = sum2(1.0 - step(vec2(0.0), coords) + step(vec2(1.0), coords));
|
||||||
alpha = clamp(alpha, 0.0, 1.0);
|
alpha = clamp(alpha, 0.0, 1.0);
|
||||||
|
BIN
app/qml/fonts/1971-ibm-3278/3270-Regular.ttf
Normal file
BIN
app/qml/fonts/1971-ibm-3278/3270-Regular.ttf
Normal file
Binary file not shown.
Binary file not shown.
@ -53,20 +53,30 @@ ApplicationWindow {
|
|||||||
property bool fullscreen: appSettings.fullscreen
|
property bool fullscreen: appSettings.fullscreen
|
||||||
onFullscreenChanged: visibility = (fullscreen ? Window.FullScreen : Window.Windowed)
|
onFullscreenChanged: visibility = (fullscreen ? Window.FullScreen : Window.Windowed)
|
||||||
|
|
||||||
menuBar: WindowMenu {
|
menuBar: qtquickMenuLoader.item
|
||||||
id: mainMenu
|
|
||||||
visible: (Qt.platform.os === "osx" || appSettings.showMenubar)
|
Loader {
|
||||||
|
id: qtquickMenuLoader
|
||||||
|
active: !appSettings.isMacOS && appSettings.showMenubar
|
||||||
|
sourceComponent: WindowMenu { }
|
||||||
|
}
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
id: globalMenuLoader
|
||||||
|
active: appSettings.isMacOS
|
||||||
|
sourceComponent: OSXMenu { }
|
||||||
}
|
}
|
||||||
|
|
||||||
property string wintitle: appSettings.wintitle
|
property string wintitle: appSettings.wintitle
|
||||||
|
|
||||||
color: "#00000000"
|
color: "#00000000"
|
||||||
|
|
||||||
title: terminalContainer.title || qsTr(appSettings.wintitle)
|
title: terminalContainer.title || qsTr(appSettings.wintitle)
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
id: showMenubarAction
|
id: showMenubarAction
|
||||||
text: qsTr("Show Menubar")
|
text: qsTr("Show Menubar")
|
||||||
enabled: Qt.platform.os !== "osx"
|
enabled: !appSettings.isMacOS
|
||||||
shortcut: "Ctrl+Shift+M"
|
shortcut: "Ctrl+Shift+M"
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: appSettings.showMenubar
|
checked: appSettings.showMenubar
|
||||||
@ -75,7 +85,7 @@ ApplicationWindow {
|
|||||||
Action {
|
Action {
|
||||||
id: fullscreenAction
|
id: fullscreenAction
|
||||||
text: qsTr("Fullscreen")
|
text: qsTr("Fullscreen")
|
||||||
enabled: Qt.platform.os !== "osx"
|
enabled: !appSettings.isMacOS
|
||||||
shortcut: "Alt+F11"
|
shortcut: "Alt+F11"
|
||||||
onTriggered: appSettings.fullscreen = !appSettings.fullscreen
|
onTriggered: appSettings.fullscreen = !appSettings.fullscreen
|
||||||
checkable: true
|
checkable: true
|
||||||
@ -106,6 +116,11 @@ ApplicationWindow {
|
|||||||
text: qsTr("Paste")
|
text: qsTr("Paste")
|
||||||
shortcut: "Ctrl+Shift+V"
|
shortcut: "Ctrl+Shift+V"
|
||||||
}
|
}
|
||||||
|
Action {
|
||||||
|
id: pasteActionAlt
|
||||||
|
text: qsTr("Paste selection")
|
||||||
|
shortcut: "Shift+Insert"
|
||||||
|
}
|
||||||
Action {
|
Action {
|
||||||
id: zoomIn
|
id: zoomIn
|
||||||
text: qsTr("Zoom In")
|
text: qsTr("Zoom In")
|
||||||
@ -127,9 +142,6 @@ ApplicationWindow {
|
|||||||
aboutDialog.raise()
|
aboutDialog.raise()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ApplicationConstants {
|
|
||||||
id: appConstants
|
|
||||||
}
|
|
||||||
ApplicationSettings {
|
ApplicationSettings {
|
||||||
id: appSettings
|
id: appSettings
|
||||||
}
|
}
|
||||||
@ -157,7 +169,7 @@ ApplicationWindow {
|
|||||||
onClosing: {
|
onClosing: {
|
||||||
// OSX Since we are currently supporting only one window
|
// OSX Since we are currently supporting only one window
|
||||||
// quit the application when it is closed.
|
// quit the application when it is closed.
|
||||||
if (Qt.platform.os === "osx")
|
if (appSettings.isMacOS)
|
||||||
Qt.quit()
|
Qt.quit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
89
app/qml/menus/OSXMenu.qml
Normal file
89
app/qml/menus/OSXMenu.qml
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* 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: 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: zoomIn.text
|
||||||
|
shortcut: "Meta++"
|
||||||
|
onTriggered: zoomIn.trigger()
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
text: zoomOut.text
|
||||||
|
shortcut: "Meta+-"
|
||||||
|
onTriggered: zoomOut.trigger()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Menu {
|
||||||
|
id: profilesMenu
|
||||||
|
title: qsTr("Profiles")
|
||||||
|
Instantiator {
|
||||||
|
model: appSettings.profilesList
|
||||||
|
delegate: MenuItem {
|
||||||
|
text: model.text
|
||||||
|
onTriggered: {
|
||||||
|
appSettings.loadProfileString(obj_string)
|
||||||
|
appSettings.handleFontChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onObjectAdded: profilesMenu.insertItem(index, object)
|
||||||
|
onObjectRemoved: profilesMenu.removeItem(object)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Menu {
|
||||||
|
title: qsTr("Help")
|
||||||
|
MenuItem {
|
||||||
|
text: showAboutAction.text
|
||||||
|
onTriggered: showAboutAction.trigger()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -19,7 +19,7 @@
|
|||||||
<file>SettingsTerminalTab.qml</file>
|
<file>SettingsTerminalTab.qml</file>
|
||||||
<file>FontScanlines.qml</file>
|
<file>FontScanlines.qml</file>
|
||||||
<file>fonts/1977-apple2/PrintChar21.ttf</file>
|
<file>fonts/1977-apple2/PrintChar21.ttf</file>
|
||||||
<file>fonts/1971-ibm-3278/3270Medium.ttf</file>
|
<file>fonts/1971-ibm-3278/3270-Regular.ttf</file>
|
||||||
<file>Storage.qml</file>
|
<file>Storage.qml</file>
|
||||||
<file>SettingsAdvancedTab.qml</file>
|
<file>SettingsAdvancedTab.qml</file>
|
||||||
<file>TerminalContainer.qml</file>
|
<file>TerminalContainer.qml</file>
|
||||||
@ -41,11 +41,10 @@
|
|||||||
<file>BurnInEffect.qml</file>
|
<file>BurnInEffect.qml</file>
|
||||||
<file>fonts/modern-terminus/TerminusTTF-4.46.0.ttf</file>
|
<file>fonts/modern-terminus/TerminusTTF-4.46.0.ttf</file>
|
||||||
<file>TerminalFrame.qml</file>
|
<file>TerminalFrame.qml</file>
|
||||||
<file>SlowBurnIn.qml</file>
|
|
||||||
<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>ShaderLibrary.qml</file>
|
<file>ShaderLibrary.qml</file>
|
||||||
<file>ApplicationConstants.qml</file>
|
<file>menus/OSXMenu.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 65e75bc6ea589b51c80e5ff3f4008de5644d7cc5
|
Subproject commit 63228027e1f97c24abb907550b22ee91836929c5
|
Loading…
x
Reference in New Issue
Block a user