Compare commits
43 Commits
fix-color-
...
v1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6446f1d1bc | ||
|
|
01f391dea3 | ||
|
|
5b635abb38 | ||
|
|
54c52b230a | ||
|
|
40eb51e5eb | ||
|
|
546c4f36f0 | ||
|
|
2911960482 | ||
|
|
265e19def8 | ||
|
|
2bc88768b6 | ||
|
|
32f7923652 | ||
|
|
e379f05aca | ||
|
|
a7bab660e9 | ||
|
|
1bcb85968b | ||
|
|
4adf13539a | ||
|
|
8b47c5633a | ||
|
|
cb1e3f1b76 | ||
|
|
92ef89d5d2 | ||
|
|
b8fd9d6c45 | ||
|
|
0c17ca115e | ||
|
|
505a840574 | ||
|
|
56d742c1d2 | ||
|
|
28c66fa689 | ||
|
|
ceea1339d0 | ||
|
|
8aea50fd2b | ||
|
|
166e1f40fe | ||
|
|
415dcafee3 | ||
|
|
0399a6eb3c | ||
|
|
ac70da5b38 | ||
|
|
5ad20f6b4e | ||
|
|
283aa92579 | ||
|
|
a24cbbcc93 | ||
|
|
17b70b47ce | ||
|
|
295912fbb3 | ||
|
|
859adf966a | ||
|
|
cf404f980d | ||
|
|
6979abe96a | ||
|
|
c685cbd640 | ||
|
|
4934d78cea | ||
|
|
c6716e1b1a | ||
|
|
cc1d77ea32 | ||
|
|
3e7ac0d87d | ||
|
|
a6952251de | ||
|
|
d10bf29493 |
14
README.md
@@ -4,14 +4,14 @@
|
|||||||
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) developed by me: https://github.com/Swordfish90/qmltermwidget .
|
||||||
|
|
||||||
This terminal emulator requires Qt 5.2 or higher to run.
|
This terminal emulator works under Linux and OSX and requires Qt 5.2 or higher.
|
||||||
|
|
||||||
##Screenshots
|
##Screenshots
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
##Get cool-retro-term
|
##Get cool-retro-term
|
||||||
You can either build cool-retro-term yourself (see below) or walk the easy way and install one of these packages:
|
You can either build cool-retro-term yourself (see below) or walk the easy way and install one of these packages:
|
||||||
@@ -31,6 +31,10 @@ Gentoo users can install from a 3rd-party repository preferably via layman:
|
|||||||
|
|
||||||
A word of warning: USE flags and keywords are to be added to portage's configuration files and every emerge operation should be executed with '-p' (short option for --pretend) appended to the command line first as per best practice!
|
A word of warning: USE flags and keywords are to be added to portage's configuration files and every emerge operation should be executed with '-p' (short option for --pretend) appended to the command line first as per best practice!
|
||||||
|
|
||||||
|
Ubuntu users of 14.04 LTS (Trusty) can use [this PPA](https://launchpad.net/~bugs-launchpad-net-falkensweb)
|
||||||
|
|
||||||
|
OSX users can grab the latest dmg from the release page: https://github.com/Swordfish90/cool-retro-term/releases
|
||||||
|
|
||||||
##Build instructions (Linux)
|
##Build instructions (Linux)
|
||||||
|
|
||||||
##Dependencies
|
##Dependencies
|
||||||
|
|||||||
14
app/app.pro
@@ -20,3 +20,17 @@ RESOURCES += qml/resources.qrc
|
|||||||
target.path += /usr/bin/
|
target.path += /usr/bin/
|
||||||
|
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
|
||||||
|
# Install icons
|
||||||
|
unix {
|
||||||
|
icon32.files = icons/32x32/cool-retro-term.png
|
||||||
|
icon32.path = /usr/share/icons/hicolor/32x32/apps
|
||||||
|
icon64.files = icons/64x64/cool-retro-term.png
|
||||||
|
icon64.path = /usr/share/icons/hicolor/64x64/apps
|
||||||
|
icon128.files = icons/128x128/cool-retro-term.png
|
||||||
|
icon128.path = /usr/share/icons/hicolor/128x128/apps
|
||||||
|
icon256.files = icons/256x256/cool-retro-term.png
|
||||||
|
icon256.path = /usr/share/icons/hicolor/256x256/apps
|
||||||
|
|
||||||
|
INSTALLS += icon32 icon64 icon128 icon256
|
||||||
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
19
app/main.cpp
@@ -5,6 +5,7 @@
|
|||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QIcon>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -24,11 +25,26 @@ QString getNamedArgument(QStringList args, QString name)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
// Some environmental variable are necessary on certain platforms.
|
||||||
|
|
||||||
|
// This disables QT appmenu under Ubuntu, which is not working with QML apps.
|
||||||
setenv("QT_QPA_PLATFORMTHEME", "", 1);
|
setenv("QT_QPA_PLATFORMTHEME", "", 1);
|
||||||
|
|
||||||
|
#if defined(Q_OS_MAC)
|
||||||
|
// This allows UTF-8 characters usage in OSX.
|
||||||
|
setenv("LC_CTYPE", "UTF-8", 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
QQmlApplicationEngine engine;
|
QQmlApplicationEngine engine;
|
||||||
FileIO fileIO;
|
FileIO fileIO;
|
||||||
|
|
||||||
|
#if !defined(Q_OS_MAC)
|
||||||
|
app.setWindowIcon(QIcon::fromTheme("cool-retro-term", QIcon(":../icons/32x32/cool-retro-term.png")));
|
||||||
|
#else
|
||||||
|
app.setWindowIcon(QIcon(":../icons/32x32/cool-retro-term.png"));
|
||||||
|
#endif
|
||||||
|
|
||||||
// Manage command line arguments from the cpp side
|
// Manage command line arguments from the cpp side
|
||||||
QStringList args = app.arguments();
|
QStringList args = app.arguments();
|
||||||
if (args.contains("-h") || args.contains("--help")) {
|
if (args.contains("-h") || args.contains("--help")) {
|
||||||
@@ -56,10 +72,13 @@ int main(int argc, char *argv[])
|
|||||||
engine.rootContext()->setContextProperty("workdir", getNamedArgument(args, "--workdir", "$HOME"));
|
engine.rootContext()->setContextProperty("workdir", getNamedArgument(args, "--workdir", "$HOME"));
|
||||||
engine.rootContext()->setContextProperty("fileIO", &fileIO);
|
engine.rootContext()->setContextProperty("fileIO", &fileIO);
|
||||||
|
|
||||||
|
engine.rootContext()->setContextProperty("devicePixelRatio", app.devicePixelRatio());
|
||||||
|
|
||||||
// Manage import paths for Linux and OSX.
|
// Manage import paths for Linux and OSX.
|
||||||
QStringList importPathList = engine.importPathList();
|
QStringList importPathList = engine.importPathList();
|
||||||
importPathList.prepend(QCoreApplication::applicationDirPath() + "/qmltermwidget");
|
importPathList.prepend(QCoreApplication::applicationDirPath() + "/qmltermwidget");
|
||||||
importPathList.prepend(QCoreApplication::applicationDirPath() + "/../PlugIns");
|
importPathList.prepend(QCoreApplication::applicationDirPath() + "/../PlugIns");
|
||||||
|
importPathList.prepend(QCoreApplication::applicationDirPath() + "/../../../qmltermwidget");
|
||||||
engine.setImportPathList(importPathList);
|
engine.setImportPathList(importPathList);
|
||||||
|
|
||||||
engine.load(QUrl("qrc:/main.qml"));
|
engine.load(QUrl("qrc:/main.qml"));
|
||||||
|
|||||||
@@ -19,13 +19,19 @@
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
|
import QtQuick.Controls 1.0
|
||||||
|
|
||||||
import "utils.js" as Utils
|
import "utils.js" as Utils
|
||||||
|
|
||||||
QtObject{
|
QtObject{
|
||||||
property string version: "1.0.0 RC1"
|
property string version: "1.0.0"
|
||||||
|
|
||||||
// GENERAL SETTINGS ///////////////////////////////////////////////////
|
// STATIC CONSTANTS ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
readonly property real minimumFontScaling: 0.25
|
||||||
|
readonly property real maximumFontScaling: 2.50
|
||||||
|
|
||||||
|
// GENERAL SETTINGS ///////////////////////////////////////////////////////
|
||||||
|
|
||||||
property bool fullscreen: false
|
property bool fullscreen: false
|
||||||
property bool showMenubar: true
|
property bool showMenubar: true
|
||||||
@@ -81,7 +87,9 @@ QtObject{
|
|||||||
property real fontScaling: 1.0
|
property real fontScaling: 1.0
|
||||||
property real fontWidth: 1.0
|
property real fontWidth: 1.0
|
||||||
|
|
||||||
property var fontNames: ["HERMIT", "COMMODORE_PET", "COMMODORE_PET"]
|
property bool lowResolutionFont: false
|
||||||
|
|
||||||
|
property var fontNames: ["TERMINUS_SCALED", "COMMODORE_PET", "COMMODORE_PET"]
|
||||||
property var fontlist: fontManager.item.fontlist
|
property var fontlist: fontManager.item.fontlist
|
||||||
|
|
||||||
signal terminalFontChanged(string fontSource, int pixelSize, int lineSpacing, real screenScaling, real fontWidth)
|
signal terminalFontChanged(string fontSource, int pixelSize, int lineSpacing, real screenScaling, real fontWidth)
|
||||||
@@ -111,12 +119,12 @@ QtObject{
|
|||||||
}
|
}
|
||||||
|
|
||||||
function incrementScaling(){
|
function incrementScaling(){
|
||||||
fontScaling = Math.min(fontScaling + 0.05, 2.50);
|
fontScaling = Math.min(fontScaling + 0.05, maximumFontScaling);
|
||||||
handleFontChanged();
|
handleFontChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
function decrementScaling(){
|
function decrementScaling(){
|
||||||
fontScaling = Math.max(fontScaling - 0.05, 0.50);
|
fontScaling = Math.max(fontScaling - 0.05, minimumFontScaling);
|
||||||
handleFontChanged();
|
handleFontChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,6 +143,8 @@ QtObject{
|
|||||||
var screenScaling = fontManager.item.screenScaling;
|
var screenScaling = fontManager.item.screenScaling;
|
||||||
var fontWidth = fontManager.item.defaultFontWidth * appSettings.fontWidth;
|
var fontWidth = fontManager.item.defaultFontWidth * appSettings.fontWidth;
|
||||||
|
|
||||||
|
lowResolutionFont = fontManager.item.lowResolutionFont;
|
||||||
|
|
||||||
terminalFontChanged(fontSource, pixelSize, lineSpacing, screenScaling, fontWidth);
|
terminalFontChanged(fontSource, pixelSize, lineSpacing, screenScaling, fontWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -367,12 +377,12 @@ QtObject{
|
|||||||
property ListModel profilesList: ListModel{
|
property ListModel profilesList: ListModel{
|
||||||
ListElement{
|
ListElement{
|
||||||
text: "Default Amber"
|
text: "Default Amber"
|
||||||
obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.65,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"HERMIT","fontColor":"#ff8100","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.16,"jitter":0.18,"burnIn":0.4,"staticNoise":0.1,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}'
|
obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.65,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"TERMINUS_SCALED","fontColor":"#ff8100","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.16,"jitter":0.18,"burnIn":0.4,"staticNoise":0.1,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}'
|
||||||
builtin: true
|
builtin: true
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
text: "Default Green"
|
text: "Default Green"
|
||||||
obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"HERMIT","fontColor":"#0ccc68","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.16,"jitter":0.18,"burnIn":0.45,"staticNoise":0.1,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}'
|
obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"TERMINUS_SCALED","fontColor":"#0ccc68","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.16,"jitter":0.18,"burnIn":0.45,"staticNoise":0.1,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}'
|
||||||
builtin: true
|
builtin: true
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
@@ -407,7 +417,7 @@ QtObject{
|
|||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
text: "Transparent Green"
|
text: "Transparent Green"
|
||||||
obj_string: '{"ambientLight":0.2,"backgroundColor":"#000000","bloom":0.45,"brightness":0.5,"flickering":0.20,"contrast":0.85,"fontName":"HERMIT","fontColor":"#0ccc68","frameName":"NO_FRAME","glowingLine":0.16,"horizontalSync":0.1,"jitter":0.20,"burnIn":0.25,"staticNoise":0.20,"rasterization":0,"screenCurvature":0.05,"windowOpacity":0.60,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}'
|
obj_string: '{"ambientLight":0.2,"backgroundColor":"#000000","bloom":0.45,"brightness":0.5,"flickering":0.20,"contrast":0.85,"fontName":"TERMINUS_SCALED","fontColor":"#0ccc68","frameName":"NO_FRAME","glowingLine":0.16,"horizontalSync":0.1,"jitter":0.20,"burnIn":0.25,"staticNoise":0.20,"rasterization":0,"screenCurvature":0.05,"windowOpacity":0.60,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}'
|
||||||
builtin: true
|
builtin: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -451,4 +461,11 @@ QtObject{
|
|||||||
storeCustomProfiles();
|
storeCustomProfiles();
|
||||||
//storage.dropSettings(); //DROPS THE SETTINGS!.. REMEMBER TO DISABLE ONCE ENABLED!!
|
//storage.dropSettings(); //DROPS THE SETTINGS!.. REMEMBER TO DISABLE ONCE ENABLED!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// VARS ///////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
property Label _sampleLabel: Label {
|
||||||
|
text: "100%"
|
||||||
|
}
|
||||||
|
property real labelWidth: _sampleLabel.width
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import QtQuick 2.2
|
|||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 1.1
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
|
import "Components"
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
property alias name: check.text
|
property alias name: check.text
|
||||||
|
|
||||||
@@ -35,7 +37,6 @@ RowLayout {
|
|||||||
id: setting_component
|
id: setting_component
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
spacing: 25
|
|
||||||
|
|
||||||
onValueChanged: {
|
onValueChanged: {
|
||||||
check.checked = !(value == 0);
|
check.checked = !(value == 0);
|
||||||
@@ -45,7 +46,7 @@ RowLayout {
|
|||||||
|
|
||||||
CheckBox{
|
CheckBox{
|
||||||
id: check
|
id: check
|
||||||
implicitWidth: 150
|
implicitWidth: 160
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if(!checked){
|
if(!checked){
|
||||||
checked = false;
|
checked = false;
|
||||||
@@ -66,16 +67,8 @@ RowLayout {
|
|||||||
newValue(value);
|
newValue(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text{
|
SizedLabel {
|
||||||
id: textfield
|
anchors { top: parent.top; bottom: parent.bottom }
|
||||||
property string unformattedText: Math.round(((value - min_value) / (max_value - min_value)) * 100)
|
text: Math.round(((value - min_value) / (max_value - min_value)) * 100) + "%"
|
||||||
text: formatNumber(unformattedText)
|
|
||||||
}
|
|
||||||
function formatNumber(num) {
|
|
||||||
var n = "" + num;
|
|
||||||
while (n.length < 3) {
|
|
||||||
n = " " + n;
|
|
||||||
}
|
|
||||||
return n + "%";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ import QtQuick.Dialogs 1.1
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: rootItem
|
id: rootItem
|
||||||
property alias color: colorDialog.color
|
|
||||||
|
signal colorSelected (color color)
|
||||||
|
property color color
|
||||||
property string name
|
property string name
|
||||||
|
|
||||||
ColorDialog {
|
ColorDialog {
|
||||||
@@ -31,6 +33,10 @@ Item {
|
|||||||
title: qsTr("Choose a color")
|
title: qsTr("Choose a color")
|
||||||
modality: Qt.ApplicationModal
|
modality: Qt.ApplicationModal
|
||||||
visible: false
|
visible: false
|
||||||
|
|
||||||
|
//This is a workaround to a Qt 5.2 bug.
|
||||||
|
onColorChanged: if (Qt.platform.os !== "osx") colorSelected(color)
|
||||||
|
onAccepted: if (Qt.platform.os === "osx") colorSelected(color)
|
||||||
}
|
}
|
||||||
Rectangle{
|
Rectangle{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
35
app/qml/Components/SizedLabel.qml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2013 "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 QtQuick.Controls 1.0
|
||||||
|
|
||||||
|
// This component is simply a label with a predifined size.
|
||||||
|
// Used to improve alignment.
|
||||||
|
|
||||||
|
Item {
|
||||||
|
property alias text: textfield.text
|
||||||
|
width: appSettings.labelWidth
|
||||||
|
Label{
|
||||||
|
id: textfield
|
||||||
|
anchors { right: parent.right; verticalCenter: parent.verticalCenter }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -29,6 +29,7 @@ QtObject{
|
|||||||
property int lineSpacing: _font.lineSpacing
|
property int lineSpacing: _font.lineSpacing
|
||||||
property real screenScaling: scaling * _font.baseScaling
|
property real screenScaling: scaling * _font.baseScaling
|
||||||
property real defaultFontWidth: fontlist.get(selectedFontIndex).fontWidth
|
property real defaultFontWidth: fontlist.get(selectedFontIndex).fontWidth
|
||||||
|
property bool lowResolutionFont: true
|
||||||
|
|
||||||
property ListModel fontlist: ListModel{
|
property ListModel fontlist: ListModel{
|
||||||
ListElement{
|
ListElement{
|
||||||
@@ -49,6 +50,24 @@ QtObject{
|
|||||||
baseScaling: 4.0
|
baseScaling: 4.0
|
||||||
fontWidth: 0.9
|
fontWidth: 0.9
|
||||||
}
|
}
|
||||||
|
ListElement{
|
||||||
|
name: "TERMINUS_SCALED"
|
||||||
|
text: "Terminus (Modern)"
|
||||||
|
source: "fonts/modern-terminus/TerminusTTF-4.38.2.ttf"
|
||||||
|
lineSpacing: 1
|
||||||
|
pixelSize: 12
|
||||||
|
baseScaling: 3.0
|
||||||
|
fontWidth: 1.0
|
||||||
|
}
|
||||||
|
ListElement{
|
||||||
|
name: "PRO_FONT_SCALED"
|
||||||
|
text: "Pro Font (Modern)"
|
||||||
|
source: "fonts/modern-pro-font-win-tweaked/ProFontWindows.ttf"
|
||||||
|
lineSpacing: 1
|
||||||
|
pixelSize: 12
|
||||||
|
baseScaling: 3.0
|
||||||
|
fontWidth: 1.0
|
||||||
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "APPLE_II"
|
name: "APPLE_II"
|
||||||
text: "Apple ][ (1977)"
|
text: "Apple ][ (1977)"
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ QtObject{
|
|||||||
property int lineSpacing: _font.lineSpacing
|
property int lineSpacing: _font.lineSpacing
|
||||||
property real screenScaling: scaling * _font.baseScaling
|
property real screenScaling: scaling * _font.baseScaling
|
||||||
property real defaultFontWidth: fontlist.get(selectedFontIndex).fontWidth
|
property real defaultFontWidth: fontlist.get(selectedFontIndex).fontWidth
|
||||||
|
property bool lowResolutionFont: true
|
||||||
|
|
||||||
property ListModel fontlist: ListModel{
|
property ListModel fontlist: ListModel{
|
||||||
ListElement{
|
ListElement{
|
||||||
@@ -49,6 +50,24 @@ QtObject{
|
|||||||
baseScaling: 4.0
|
baseScaling: 4.0
|
||||||
fontWidth: 0.9
|
fontWidth: 0.9
|
||||||
}
|
}
|
||||||
|
ListElement{
|
||||||
|
name: "TERMINUS_SCALED"
|
||||||
|
text: "Terminus (Modern)"
|
||||||
|
source: "fonts/modern-terminus/TerminusTTF-4.38.2.ttf"
|
||||||
|
lineSpacing: 1
|
||||||
|
pixelSize: 12
|
||||||
|
baseScaling: 3.0
|
||||||
|
fontWidth: 1.0
|
||||||
|
}
|
||||||
|
ListElement{
|
||||||
|
name: "PRO_FONT_SCALED"
|
||||||
|
text: "Pro Font (Modern)"
|
||||||
|
source: "fonts/modern-pro-font-win-tweaked/ProFontWindows.ttf"
|
||||||
|
lineSpacing: 1
|
||||||
|
pixelSize: 12
|
||||||
|
baseScaling: 3.0
|
||||||
|
fontWidth: 1.0
|
||||||
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "APPLE_II"
|
name: "APPLE_II"
|
||||||
text: "Apple ][ (1977)"
|
text: "Apple ][ (1977)"
|
||||||
|
|||||||
@@ -25,117 +25,193 @@ QtObject{
|
|||||||
property real scaling
|
property real scaling
|
||||||
property var source: fontlist.get(selectedFontIndex).source
|
property var source: fontlist.get(selectedFontIndex).source
|
||||||
property var _font: fontlist.get(selectedFontIndex)
|
property var _font: fontlist.get(selectedFontIndex)
|
||||||
property int pixelSize: _font.pixelSize * scaling
|
property bool lowResolutionFont: _font.lowResolutionFont
|
||||||
property int lineSpacing: pixelSize * _font.lineSpacing
|
|
||||||
property real screenScaling: 1.0
|
property int pixelSize: lowResolutionFont
|
||||||
|
? _font.pixelSize
|
||||||
|
: _font.pixelSize * scaling
|
||||||
|
|
||||||
|
property int lineSpacing: lowResolutionFont
|
||||||
|
? _font.lineSpacing
|
||||||
|
: pixelSize * _font.lineSpacing
|
||||||
|
|
||||||
|
property real screenScaling: lowResolutionFont
|
||||||
|
? _font.baseScaling * scaling
|
||||||
|
: 1.0
|
||||||
|
|
||||||
property real defaultFontWidth: fontlist.get(selectedFontIndex).fontWidth
|
property real defaultFontWidth: fontlist.get(selectedFontIndex).fontWidth
|
||||||
|
|
||||||
//In this configuration lineSpacing is proportional to pixelSize.
|
// There are two kind of fonts: low resolution and high resolution.
|
||||||
|
// Low resolution font sets the lowResolutionFont property to true.
|
||||||
|
// They are rendered at a fixed pixel size and the texture is upscaled
|
||||||
|
// to fill the screen (they are much faster to render).
|
||||||
|
// High resolution fonts are instead drawn on a texture which has the
|
||||||
|
// size of the screen, and the scaling directly controls their pixels size.
|
||||||
|
// Those are slower to render but are not pixelated.
|
||||||
|
|
||||||
property ListModel fontlist: ListModel{
|
property ListModel fontlist: ListModel{
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "HERMIT"
|
name: "TERMINUS_SCALED"
|
||||||
text: "Hermit (Modern)"
|
|
||||||
source: "fonts/modern-hermit/Hermit-medium.otf"
|
|
||||||
lineSpacing: 0.05
|
|
||||||
pixelSize: 28
|
|
||||||
fontWidth: 1.0
|
|
||||||
}
|
|
||||||
ListElement{
|
|
||||||
name: "TERMINUS"
|
|
||||||
text: "Terminus (Modern)"
|
text: "Terminus (Modern)"
|
||||||
source: "fonts/modern-terminus/TerminusTTF-4.38.2.ttf"
|
source: "fonts/modern-terminus/TerminusTTF-4.38.2.ttf"
|
||||||
lineSpacing: 0.1
|
lineSpacing: 1
|
||||||
pixelSize: 35
|
pixelSize: 12
|
||||||
|
baseScaling: 3.0
|
||||||
fontWidth: 1.0
|
fontWidth: 1.0
|
||||||
|
lowResolutionFont: true
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "ENVY_CODE_R"
|
name: "PRO_FONT_SCALED"
|
||||||
text: "Envy Code R (Modern)"
|
|
||||||
source: "fonts/modern-envy-code-r/Envy Code R.ttf"
|
|
||||||
lineSpacing: 0.1
|
|
||||||
pixelSize: 30
|
|
||||||
fontWidth: 1.0
|
|
||||||
}
|
|
||||||
ListElement{
|
|
||||||
name: "PRO_FONT"
|
|
||||||
text: "Pro Font (Modern)"
|
text: "Pro Font (Modern)"
|
||||||
source: "fonts/modern-pro-font-win-tweaked/ProFontWindows.ttf"
|
source: "fonts/modern-pro-font-win-tweaked/ProFontWindows.ttf"
|
||||||
lineSpacing: 0.1
|
lineSpacing: 1
|
||||||
pixelSize: 35
|
pixelSize: 12
|
||||||
|
baseScaling: 3.0
|
||||||
fontWidth: 1.0
|
fontWidth: 1.0
|
||||||
|
lowResolutionFont: true
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "MONACO"
|
name: "EXCELSIOR_SCALED"
|
||||||
text: "Monaco (Modern)"
|
text: "Fixedsys Excelsior (Modern)"
|
||||||
source: "fonts/modern-monaco/monaco.ttf"
|
source: "fonts/modern-fixedsys-excelsior/FSEX301-L2.ttf"
|
||||||
lineSpacing: 0.1
|
lineSpacing: 0
|
||||||
pixelSize: 30
|
pixelSize: 16
|
||||||
|
baseScaling: 2.4
|
||||||
fontWidth: 1.0
|
fontWidth: 1.0
|
||||||
|
lowResolutionFont: true
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "INCONSOLATA"
|
name: "COMMODORE_PET_SCALED"
|
||||||
text: "Inconsolata (Modern)"
|
|
||||||
source: "fonts/modern-inconsolata/Inconsolata.otf"
|
|
||||||
lineSpacing: 0.1
|
|
||||||
pixelSize: 35
|
|
||||||
fontWidth: 1.0
|
|
||||||
}
|
|
||||||
ListElement{
|
|
||||||
name: "COMMODORE_PET"
|
|
||||||
text: "Commodore PET (1977)"
|
text: "Commodore PET (1977)"
|
||||||
source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf"
|
source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf"
|
||||||
lineSpacing: 0.2
|
lineSpacing: 2
|
||||||
pixelSize: 26
|
pixelSize: 8
|
||||||
|
baseScaling: 3.5
|
||||||
fontWidth: 0.7
|
fontWidth: 0.7
|
||||||
|
lowResolutionFont: true
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "APPLE_II"
|
name: "PROGGY_TINY_SCALED"
|
||||||
|
text: "Proggy Tiny (Modern)"
|
||||||
|
source: "fonts/modern-proggy-tiny/ProggyTiny.ttf"
|
||||||
|
lineSpacing: 1
|
||||||
|
pixelSize: 16
|
||||||
|
baseScaling: 3.0
|
||||||
|
fontWidth: 0.9
|
||||||
|
lowResolutionFont: true
|
||||||
|
}
|
||||||
|
ListElement{
|
||||||
|
name: "APPLE_II_SCALED"
|
||||||
text: "Apple ][ (1977)"
|
text: "Apple ][ (1977)"
|
||||||
source: "fonts/1977-apple2/PrintChar21.ttf"
|
source: "fonts/1977-apple2/PrintChar21.ttf"
|
||||||
lineSpacing: 0.2
|
lineSpacing: 2
|
||||||
pixelSize: 26
|
pixelSize: 8
|
||||||
|
baseScaling: 3.5
|
||||||
fontWidth: 0.8
|
fontWidth: 0.8
|
||||||
|
lowResolutionFont: true
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "ATARI_400"
|
name: "ATARI_400_SCALED"
|
||||||
text: "Atari 400-800 (1979)"
|
text: "Atari 400-800 (1979)"
|
||||||
source: "fonts/1979-atari-400-800/ATARI400800_original.TTF"
|
source: "fonts/1979-atari-400-800/ATARI400800_original.TTF"
|
||||||
lineSpacing: 0.3
|
lineSpacing: 3
|
||||||
pixelSize: 26
|
pixelSize: 8
|
||||||
|
baseScaling: 3.5
|
||||||
fontWidth: 0.7
|
fontWidth: 0.7
|
||||||
|
lowResolutionFont: true
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "COMMODORE_64"
|
name: "COMMODORE_64_SCALED"
|
||||||
text: "Commodore 64 (1982)"
|
text: "Commodore 64 (1982)"
|
||||||
source: "fonts/1982-commodore64/C64_Pro_Mono_v1.0-STYLE.ttf"
|
source: "fonts/1982-commodore64/C64_Pro_Mono_v1.0-STYLE.ttf"
|
||||||
lineSpacing: 0.3
|
lineSpacing: 3
|
||||||
pixelSize: 26
|
pixelSize: 8
|
||||||
|
baseScaling: 3.5
|
||||||
fontWidth: 0.7
|
fontWidth: 0.7
|
||||||
|
lowResolutionFont: true
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "ATARI_ST"
|
name: "ATARI_ST_SCALED"
|
||||||
text: "Atari ST (1985)"
|
text: "Atari ST (1985)"
|
||||||
source: "fonts/1985-atari-st/AtariST8x16SystemFont.ttf"
|
source: "fonts/1985-atari-st/AtariST8x16SystemFont.ttf"
|
||||||
lineSpacing: 0.2
|
lineSpacing: 3
|
||||||
pixelSize: 32
|
pixelSize: 16
|
||||||
|
baseScaling: 2.0
|
||||||
fontWidth: 1.0
|
fontWidth: 1.0
|
||||||
|
lowResolutionFont: true
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "IBM_DOS"
|
name: "IBM_DOS"
|
||||||
text: "IBM DOS (1985)"
|
text: "IBM DOS (1985)"
|
||||||
source: "fonts/1985-ibm-pc-vga/Perfect DOS VGA 437 Win.ttf"
|
source: "fonts/1985-ibm-pc-vga/Perfect DOS VGA 437 Win.ttf"
|
||||||
lineSpacing: 0.2
|
lineSpacing: 3
|
||||||
pixelSize: 32
|
pixelSize: 16
|
||||||
|
baseScaling: 2.0
|
||||||
fontWidth: 1.0
|
fontWidth: 1.0
|
||||||
|
lowResolutionFont: true
|
||||||
|
}
|
||||||
|
ListElement{
|
||||||
|
name: "HERMIT"
|
||||||
|
text: "HD: Hermit (Modern)"
|
||||||
|
source: "fonts/modern-hermit/Hermit-medium.otf"
|
||||||
|
lineSpacing: 0.05
|
||||||
|
pixelSize: 28
|
||||||
|
fontWidth: 1.0
|
||||||
|
lowResolutionFont: false
|
||||||
|
}
|
||||||
|
ListElement{
|
||||||
|
name: "TERMINUS"
|
||||||
|
text: "HD: Terminus (Modern)"
|
||||||
|
source: "fonts/modern-terminus/TerminusTTF-4.38.2.ttf"
|
||||||
|
lineSpacing: 0.1
|
||||||
|
pixelSize: 35
|
||||||
|
fontWidth: 1.0
|
||||||
|
lowResolutionFont: false
|
||||||
|
}
|
||||||
|
ListElement{
|
||||||
|
name: "PRO_FONT"
|
||||||
|
text: "HD: Pro Font (Modern)"
|
||||||
|
source: "fonts/modern-pro-font-win-tweaked/ProFontWindows.ttf"
|
||||||
|
lineSpacing: 0.1
|
||||||
|
pixelSize: 35
|
||||||
|
fontWidth: 1.0
|
||||||
|
lowResolutionFont: false
|
||||||
|
}
|
||||||
|
ListElement{
|
||||||
|
name: "ENVY_CODE_R"
|
||||||
|
text: "HD: Envy Code R (Modern)"
|
||||||
|
source: "fonts/modern-envy-code-r/Envy Code R.ttf"
|
||||||
|
lineSpacing: 0.1
|
||||||
|
pixelSize: 30
|
||||||
|
fontWidth: 1.0
|
||||||
|
lowResolutionFont: false
|
||||||
|
}
|
||||||
|
ListElement{
|
||||||
|
name: "MONACO"
|
||||||
|
text: "HD: Monaco (Modern)"
|
||||||
|
source: "fonts/modern-monaco/monaco.ttf"
|
||||||
|
lineSpacing: 0.1
|
||||||
|
pixelSize: 30
|
||||||
|
fontWidth: 1.0
|
||||||
|
lowResolutionFont: false
|
||||||
|
}
|
||||||
|
ListElement{
|
||||||
|
name: "INCONSOLATA"
|
||||||
|
text: "HD: Inconsolata (Modern)"
|
||||||
|
source: "fonts/modern-inconsolata/Inconsolata.otf"
|
||||||
|
lineSpacing: 0.1
|
||||||
|
pixelSize: 35
|
||||||
|
fontWidth: 1.0
|
||||||
|
lowResolutionFont: false
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "IBM_3278"
|
name: "IBM_3278"
|
||||||
text: "IBM 3278 (1971)"
|
text: "HD: IBM 3278 (1971)"
|
||||||
source: "fonts/1971-ibm-3278/3270Medium.ttf"
|
source: "fonts/1971-ibm-3278/3270Medium.ttf"
|
||||||
lineSpacing: 0.2
|
lineSpacing: 0.2
|
||||||
pixelSize: 32
|
pixelSize: 32
|
||||||
fontWidth: 1.0
|
fontWidth: 1.0
|
||||||
|
lowResolutionFont: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ import QtQuick.Controls 1.1
|
|||||||
|
|
||||||
import QMLTermWidget 1.0
|
import QMLTermWidget 1.0
|
||||||
|
|
||||||
|
import "utils.js" as Utils
|
||||||
|
|
||||||
Item{
|
Item{
|
||||||
id: terminalContainer
|
id: terminalContainer
|
||||||
|
|
||||||
@@ -42,11 +44,13 @@ Item{
|
|||||||
anchors.topMargin: frame.displacementTop * appSettings.windowScaling
|
anchors.topMargin: frame.displacementTop * appSettings.windowScaling
|
||||||
anchors.bottomMargin: frame.displacementBottom * appSettings.windowScaling
|
anchors.bottomMargin: frame.displacementBottom * appSettings.windowScaling
|
||||||
|
|
||||||
//The blur effect has to take into account the framerate
|
//Parameters for the burnIn effect.
|
||||||
property real mBlur: appSettings.burnIn
|
property real burnIn: appSettings.burnIn
|
||||||
property real motionBlurCoefficient: (_maxBlurCoefficient * Math.sqrt(mBlur) + _minBlurCoefficient * (1 - Math.sqrt(mBlur)))
|
property real fps: appSettings.fps !== 0 ? appSettings.fps : 60
|
||||||
property real _minBlurCoefficient: 0.50
|
property real burnInFadeTime: Utils.lint(_minBurnInFadeTime, _maxBurnInFadeTime, burnIn)
|
||||||
property real _maxBlurCoefficient: 0.90
|
property real motionBlurCoefficient: 1.0 / (fps * burnInFadeTime)
|
||||||
|
property real _minBurnInFadeTime: 0.16
|
||||||
|
property real _maxBurnInFadeTime: 1.6
|
||||||
|
|
||||||
property size terminalSize: kterminal.terminalSize
|
property size terminalSize: kterminal.terminalSize
|
||||||
property size fontMetrics: kterminal.fontMetrics
|
property size fontMetrics: kterminal.fontMetrics
|
||||||
@@ -83,7 +87,7 @@ Item{
|
|||||||
|
|
||||||
colorScheme: "cool-retro-term"
|
colorScheme: "cool-retro-term"
|
||||||
|
|
||||||
smooth: appSettings.rasterization === appSettings.no_rasterization
|
smooth: !appSettings.lowResolutionFont
|
||||||
enableBold: false
|
enableBold: false
|
||||||
fullCursorHeight: true
|
fullCursorHeight: true
|
||||||
|
|
||||||
@@ -115,13 +119,13 @@ Item{
|
|||||||
function handleFontChange(fontSource, pixelSize, lineSpacing, screenScaling, fontWidth){
|
function handleFontChange(fontSource, pixelSize, lineSpacing, screenScaling, fontWidth){
|
||||||
fontLoader.source = fontSource;
|
fontLoader.source = fontSource;
|
||||||
|
|
||||||
kterminal.antialiasText = appSettings.rasterization === appSettings.no_rasterization
|
kterminal.antialiasText = !appSettings.lowResolutionFont;
|
||||||
font.pixelSize = pixelSize;
|
font.pixelSize = pixelSize;
|
||||||
font.family = fontLoader.name;
|
font.family = fontLoader.name;
|
||||||
|
|
||||||
terminalContainer.fontWidth = fontWidth;
|
terminalContainer.fontWidth = fontWidth;
|
||||||
terminalContainer.screenScaling= screenScaling;
|
terminalContainer.screenScaling = screenScaling;
|
||||||
scaleTexture = Math.max(1.0, Math.round(screenScaling / 2));
|
scaleTexture = Math.max(1.0, Math.floor(screenScaling * appSettings.windowScaling));
|
||||||
|
|
||||||
kterminal.lineSpacing = lineSpacing;
|
kterminal.lineSpacing = lineSpacing;
|
||||||
}
|
}
|
||||||
@@ -174,6 +178,7 @@ Item{
|
|||||||
MouseArea{
|
MouseArea{
|
||||||
acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
cursorShape: kterminal.terminalUsesMouse ? Qt.ArrowCursor : Qt.IBeamCursor
|
||||||
onWheel:{
|
onWheel:{
|
||||||
if(wheel.modifiers & Qt.ControlModifier){
|
if(wheel.modifiers & Qt.ControlModifier){
|
||||||
wheel.angleDelta.y > 0 ? zoomIn.trigger() : zoomOut.trigger();
|
wheel.angleDelta.y > 0 ? zoomIn.trigger() : zoomOut.trigger();
|
||||||
@@ -225,13 +230,15 @@ Item{
|
|||||||
Loader{
|
Loader{
|
||||||
id: blurredSourceLoader
|
id: blurredSourceLoader
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
active: mBlur !== 0
|
active: burnIn !== 0
|
||||||
|
|
||||||
sourceComponent: ShaderEffectSource{
|
sourceComponent: ShaderEffectSource{
|
||||||
|
property bool updateBurnIn: false
|
||||||
|
|
||||||
id: _blurredSourceEffect
|
id: _blurredSourceEffect
|
||||||
sourceItem: blurredTerminalLoader.item
|
sourceItem: blurredTerminalLoader.item
|
||||||
recursive: true
|
recursive: true
|
||||||
live: true
|
live: false
|
||||||
hideSource: true
|
hideSource: true
|
||||||
wrapMode: kterminalSource.wrapMode
|
wrapMode: kterminalSource.wrapMode
|
||||||
|
|
||||||
@@ -241,15 +248,29 @@ Item{
|
|||||||
livetimer.restart();
|
livetimer.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This updates the burnin synched with the timer.
|
||||||
|
Connections {
|
||||||
|
target: updateBurnIn ? mainShader : null
|
||||||
|
ignoreUnknownSignals: false
|
||||||
|
onTimeChanged: _blurredSourceEffect.scheduleUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
Timer{
|
Timer{
|
||||||
id: livetimer
|
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: burnInFadeTime * 1000 * 1.1
|
||||||
running: true
|
running: true
|
||||||
onTriggered: _blurredSourceEffect.live = false;
|
onTriggered: _blurredSourceEffect.updateBurnIn = false;
|
||||||
}
|
}
|
||||||
Connections{
|
Connections{
|
||||||
target: kterminal
|
target: kterminal
|
||||||
onImagePainted:{
|
onImagePainted:{
|
||||||
_blurredSourceEffect.live = true;
|
_blurredSourceEffect.scheduleUpdate();
|
||||||
|
_blurredSourceEffect.updateBurnIn = true;
|
||||||
livetimer.restart();
|
livetimer.restart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -271,15 +292,22 @@ Item{
|
|||||||
Loader{
|
Loader{
|
||||||
id: blurredTerminalLoader
|
id: blurredTerminalLoader
|
||||||
|
|
||||||
width: kterminal.width * scaleTexture * appSettings.burnInQuality
|
property int burnInScaling: scaleTexture * appSettings.burnInQuality
|
||||||
height: kterminal.height * scaleTexture * appSettings.burnInQuality
|
|
||||||
active: mBlur !== 0
|
width: appSettings.lowResolutionFont
|
||||||
|
? kterminal.width * Math.max(1, burnInScaling)
|
||||||
|
: kterminal.width * scaleTexture * appSettings.burnInQuality
|
||||||
|
height: appSettings.lowResolutionFont
|
||||||
|
? kterminal.height * Math.max(1, burnInScaling)
|
||||||
|
: kterminal.height * scaleTexture * appSettings.burnInQuality
|
||||||
|
|
||||||
|
active: burnIn !== 0
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
|
|
||||||
sourceComponent: ShaderEffect {
|
sourceComponent: ShaderEffect {
|
||||||
property variant txt_source: kterminalSource
|
property variant txt_source: kterminalSource
|
||||||
property variant blurredSource: blurredSourceLoader.item
|
property variant blurredSource: blurredSourceLoader.item
|
||||||
property real blurCoefficient: (1.0 - motionBlurCoefficient)
|
property real blurCoefficient: motionBlurCoefficient
|
||||||
|
|
||||||
blending: false
|
blending: false
|
||||||
|
|
||||||
@@ -299,10 +327,10 @@ Item{
|
|||||||
"void main() {" +
|
"void main() {" +
|
||||||
"vec2 coords = qt_TexCoord0;" +
|
"vec2 coords = qt_TexCoord0;" +
|
||||||
"vec3 origColor = texture2D(txt_source, coords).rgb;" +
|
"vec3 origColor = texture2D(txt_source, coords).rgb;" +
|
||||||
"vec3 blur_color = texture2D(blurredSource, coords).rgb * (1.0 - blurCoefficient);" +
|
"vec3 blur_color = texture2D(blurredSource, coords).rgb - vec3(blurCoefficient);" +
|
||||||
"vec3 color = min(origColor + blur_color, max(origColor, blur_color));" +
|
"vec3 color = min(origColor + blur_color, max(origColor, blur_color));" +
|
||||||
|
|
||||||
"gl_FragColor = vec4(color, step(0.02, rgb2grey(color - origColor)));" +
|
"gl_FragColor = vec4(color, rgb2grey(color - origColor));" +
|
||||||
"}"
|
"}"
|
||||||
|
|
||||||
onStatusChanged: if (log) console.log(log) //Print warning messages
|
onStatusChanged: if (log) console.log(log) //Print warning messages
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import QtQuick 2.2
|
|||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 1.1
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
|
import "Components"
|
||||||
|
|
||||||
Tab{
|
Tab{
|
||||||
ColumnLayout{
|
ColumnLayout{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -34,36 +36,39 @@ Tab{
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
rows: 2
|
rows: 2
|
||||||
columns: 3
|
columns: 3
|
||||||
CheckBox{
|
Label{text: qsTr("Effects FPS")}
|
||||||
property int fps: checked ? slider.value : 0
|
|
||||||
onFpsChanged: appSettings.fps = fps
|
|
||||||
checked: appSettings.fps !== 0
|
|
||||||
text: qsTr("Effects FPS")
|
|
||||||
}
|
|
||||||
Slider{
|
Slider{
|
||||||
id: slider
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
id: fpsSlider
|
||||||
|
onValueChanged: {
|
||||||
|
if (enabled) {
|
||||||
|
appSettings.fps = value !== 60 ? value + 1 : 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
stepSize: 1
|
stepSize: 1
|
||||||
maximumValue: 60
|
enabled: false
|
||||||
minimumValue: 1
|
Component.onCompleted: {
|
||||||
enabled: appSettings.fps !== 0
|
minimumValue = 0;
|
||||||
value: appSettings.fps !== 0 ? appSettings.fps : 60
|
maximumValue = 60;
|
||||||
|
value = appSettings.fps !== 0 ? appSettings.fps - 1 : 60;
|
||||||
|
enabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Text{text: slider.value}
|
SizedLabel{text: appSettings.fps !== 0 ? appSettings.fps : qsTr("Max")}
|
||||||
Text{text: qsTr("Texture Quality")}
|
Label{text: qsTr("Texture Quality")}
|
||||||
Slider{
|
Slider{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
id: txtslider
|
id: txtslider
|
||||||
onValueChanged: if (enabled) appSettings.windowScaling = value;
|
onValueChanged: if (enabled) appSettings.windowScaling = value;
|
||||||
stepSize: 0.10
|
stepSize: 0.05
|
||||||
enabled: false
|
enabled: false
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
minimumValue = 0.3 //Without this value gets set to 0.5
|
minimumValue = 0.25 //Without this value gets set to 0.5
|
||||||
value = appSettings.windowScaling;
|
value = appSettings.windowScaling;
|
||||||
enabled = true;
|
enabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text{text: Math.round(txtslider.value * 100) + "%"}
|
SizedLabel{text: Math.round(txtslider.value * 100) + "%"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GroupBox{
|
GroupBox{
|
||||||
@@ -74,21 +79,20 @@ Tab{
|
|||||||
GridLayout{
|
GridLayout{
|
||||||
id: bloomQualityContainer
|
id: bloomQualityContainer
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
Label{text: qsTr("Bloom Quality")}
|
||||||
Text{text: qsTr("Bloom Quality")}
|
|
||||||
Slider{
|
Slider{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
id: bloomSlider
|
id: bloomSlider
|
||||||
onValueChanged: if (enabled) appSettings.bloomQuality = value;
|
onValueChanged: if (enabled) appSettings.bloomQuality = value;
|
||||||
stepSize: 0.10
|
stepSize: 0.05
|
||||||
enabled: false
|
enabled: false
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
minimumValue = 0.3
|
minimumValue = 0.25
|
||||||
value = appSettings.bloomQuality;
|
value = appSettings.bloomQuality;
|
||||||
enabled = true;
|
enabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text{text: Math.round(bloomSlider.value * 100) + "%"}
|
SizedLabel{text: Math.round(bloomSlider.value * 100) + "%"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GroupBox{
|
GroupBox{
|
||||||
@@ -100,20 +104,20 @@ Tab{
|
|||||||
id: blurQualityContainer
|
id: blurQualityContainer
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Text{text: qsTr("BurnIn Quality")}
|
Label{text: qsTr("BurnIn Quality")}
|
||||||
Slider{
|
Slider{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
id: burnInSlider
|
id: burnInSlider
|
||||||
onValueChanged: if (enabled) appSettings.burnInQuality = value;
|
onValueChanged: if (enabled) appSettings.burnInQuality = value;
|
||||||
stepSize: 0.10
|
stepSize: 0.05
|
||||||
enabled: false
|
enabled: false
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
minimumValue = 0.3
|
minimumValue = 0.25
|
||||||
value = appSettings.burnInQuality;
|
value = appSettings.burnInQuality;
|
||||||
enabled = true;
|
enabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text{text: Math.round(burnInSlider.value * 100) + "%"}
|
SizedLabel{text: Math.round(burnInSlider.value * 100) + "%"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GroupBox{
|
GroupBox{
|
||||||
|
|||||||
@@ -46,17 +46,17 @@ Tab{
|
|||||||
GridLayout{
|
GridLayout{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
columns: 2
|
columns: 2
|
||||||
Text{ text: qsTr("Brightness") }
|
Label{ text: qsTr("Brightness") }
|
||||||
SimpleSlider{
|
SimpleSlider{
|
||||||
onValueChanged: appSettings.brightness = value
|
onValueChanged: appSettings.brightness = value
|
||||||
value: appSettings.brightness
|
value: appSettings.brightness
|
||||||
}
|
}
|
||||||
Text{ text: qsTr("Contrast") }
|
Label{ text: qsTr("Contrast") }
|
||||||
SimpleSlider{
|
SimpleSlider{
|
||||||
onValueChanged: appSettings.contrast = value
|
onValueChanged: appSettings.contrast = value
|
||||||
value: appSettings.contrast
|
value: appSettings.contrast
|
||||||
}
|
}
|
||||||
Text{ text: qsTr("Opacity") }
|
Label{ text: qsTr("Opacity") }
|
||||||
SimpleSlider{
|
SimpleSlider{
|
||||||
onValueChanged: appSettings.windowOpacity = value
|
onValueChanged: appSettings.windowOpacity = value
|
||||||
value: appSettings.windowOpacity
|
value: appSettings.windowOpacity
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import QtQuick 2.2
|
|||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 1.1
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
|
import "Components"
|
||||||
|
|
||||||
Tab{
|
Tab{
|
||||||
ColumnLayout{
|
ColumnLayout{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -32,7 +34,7 @@ Tab{
|
|||||||
GridLayout{
|
GridLayout{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
columns: 2
|
columns: 2
|
||||||
Text{ text: qsTr("Name") }
|
Label{ text: qsTr("Name") }
|
||||||
ComboBox{
|
ComboBox{
|
||||||
id: fontChanger
|
id: fontChanger
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -54,7 +56,7 @@ Tab{
|
|||||||
}
|
}
|
||||||
Component.onCompleted: updateIndex();
|
Component.onCompleted: updateIndex();
|
||||||
}
|
}
|
||||||
Text{ text: qsTr("Scaling") }
|
Label{ text: qsTr("Scaling") }
|
||||||
RowLayout{
|
RowLayout{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Slider{
|
Slider{
|
||||||
@@ -64,8 +66,8 @@ Tab{
|
|||||||
stepSize: 0.05
|
stepSize: 0.05
|
||||||
enabled: false // Another trick to fix initial bad behavior.
|
enabled: false // Another trick to fix initial bad behavior.
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
minimumValue = 0.5;
|
minimumValue = appSettings.minimumFontScaling;
|
||||||
maximumValue = 2.5;
|
maximumValue = appSettings.maximumFontScaling;
|
||||||
value = appSettings.fontScaling;
|
value = appSettings.fontScaling;
|
||||||
enabled = true;
|
enabled = true;
|
||||||
}
|
}
|
||||||
@@ -74,11 +76,11 @@ Tab{
|
|||||||
onFontScalingChanged: fontScalingChanger.value = appSettings.fontScaling;
|
onFontScalingChanged: fontScalingChanger.value = appSettings.fontScaling;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text{
|
SizedLabel{
|
||||||
text: Math.round(fontScalingChanger.value * 100) + "%"
|
text: Math.round(fontScalingChanger.value * 100) + "%"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text{ text: qsTr("Font Width") }
|
Label{ text: qsTr("Font Width") }
|
||||||
RowLayout{
|
RowLayout{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Slider{
|
Slider{
|
||||||
@@ -93,7 +95,7 @@ Tab{
|
|||||||
maximumValue = 1.5;
|
maximumValue = 1.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text{
|
SizedLabel{
|
||||||
text: Math.round(widthChanger.value * 100) + "%"
|
text: Math.round(widthChanger.value * 100) + "%"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -121,24 +123,18 @@ Tab{
|
|||||||
RowLayout{
|
RowLayout{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
ColorButton{
|
ColorButton{
|
||||||
property color settingsColor: appSettings._fontColor
|
|
||||||
onSettingsColorChanged: color = settingsColor
|
|
||||||
|
|
||||||
name: qsTr("Font")
|
name: qsTr("Font")
|
||||||
height: 50
|
height: 50
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onColorChanged: appSettings._fontColor = color
|
onColorSelected: appSettings._fontColor = color;
|
||||||
Component.onCompleted: { color = settingsColor; }
|
color: appSettings._fontColor
|
||||||
}
|
}
|
||||||
ColorButton{
|
ColorButton{
|
||||||
property color settingsColor: appSettings._backgroundColor
|
|
||||||
onSettingsColorChanged: color = settingsColor
|
|
||||||
|
|
||||||
name: qsTr("Background")
|
name: qsTr("Background")
|
||||||
height: 50
|
height: 50
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onColorChanged: appSettings._backgroundColor = color
|
onColorSelected: appSettings._backgroundColor = color;
|
||||||
Component.onCompleted: { color = settingsColor;}
|
color: appSettings._backgroundColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,8 @@
|
|||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
|
import "utils.js" as Utils
|
||||||
|
|
||||||
ShaderEffect {
|
ShaderEffect {
|
||||||
property ShaderEffectSource source
|
property ShaderEffectSource source
|
||||||
property ShaderEffectSource blurredSource
|
property ShaderEffectSource blurredSource
|
||||||
@@ -38,7 +40,7 @@ ShaderEffect {
|
|||||||
(height) / (noiseTexture.height * appSettings.windowScaling * appSettings.fontScaling))
|
(height) / (noiseTexture.height * appSettings.windowScaling * appSettings.fontScaling))
|
||||||
|
|
||||||
property real screenCurvature: appSettings.screenCurvature
|
property real screenCurvature: appSettings.screenCurvature
|
||||||
property real glowingLine: appSettings.glowingLine
|
property real glowingLine: appSettings.glowingLine * 0.2
|
||||||
|
|
||||||
property real chromaColor: appSettings.chromaColor;
|
property real chromaColor: appSettings.chromaColor;
|
||||||
|
|
||||||
@@ -56,6 +58,12 @@ ShaderEffect {
|
|||||||
|
|
||||||
property real screen_brightness: appSettings.brightness * 1.5 + 0.5
|
property real screen_brightness: appSettings.brightness * 1.5 + 0.5
|
||||||
|
|
||||||
|
// This is the average value of the abs(sin) function. Needed to avoid aliasing.
|
||||||
|
readonly property real absSinAvg: 0.63661828335466886
|
||||||
|
property size rasterizationSmooth: Qt.size(
|
||||||
|
Utils.clamp(2.0 * virtual_resolution.width / (width * devicePixelRatio), 0.0, 1.0),
|
||||||
|
Utils.clamp(2.0 * virtual_resolution.height / (height * devicePixelRatio), 0.0, 1.0))
|
||||||
|
|
||||||
property real dispX
|
property real dispX
|
||||||
property real dispY
|
property real dispY
|
||||||
property size virtual_resolution
|
property size virtual_resolution
|
||||||
@@ -153,6 +161,7 @@ ShaderEffect {
|
|||||||
uniform lowp float screen_brightness;
|
uniform lowp float screen_brightness;
|
||||||
|
|
||||||
uniform highp vec2 virtual_resolution;
|
uniform highp vec2 virtual_resolution;
|
||||||
|
uniform highp vec2 rasterizationSmooth;
|
||||||
uniform highp float dispX;
|
uniform highp float dispX;
|
||||||
uniform highp float dispY;" +
|
uniform highp float dispY;" +
|
||||||
|
|
||||||
@@ -191,16 +200,18 @@ ShaderEffect {
|
|||||||
|
|
||||||
(glowingLine !== 0 ? "
|
(glowingLine !== 0 ? "
|
||||||
float randomPass(vec2 coords){
|
float randomPass(vec2 coords){
|
||||||
return fract(smoothstep(-0.2, 0.0, coords.y - 3.0 * fract(time * 0.0001))) * glowingLine;
|
return fract(smoothstep(-120.0, 0.0, coords.y - (virtual_resolution.y + 120.0) * fract(time * 0.00015)));
|
||||||
}" : "") +
|
}" : "") +
|
||||||
|
|
||||||
"highp float getScanlineIntensity(vec2 coords) {
|
"highp float getScanlineIntensity(vec2 coords) {
|
||||||
highp float result = 1.0;" +
|
highp float result = 1.0;" +
|
||||||
|
|
||||||
(appSettings.rasterization != appSettings.no_rasterization ?
|
(appSettings.rasterization != appSettings.no_rasterization ?
|
||||||
"result *= abs(sin(coords.y * virtual_resolution.y * "+Math.PI+"));" : "") +
|
"float val = abs(sin(coords.y * virtual_resolution.y * "+Math.PI+"));
|
||||||
|
result *= mix(val, " + absSinAvg + ", rasterizationSmooth.y);" : "") +
|
||||||
(appSettings.rasterization == appSettings.pixel_rasterization ?
|
(appSettings.rasterization == appSettings.pixel_rasterization ?
|
||||||
"result *= abs(sin(coords.x * virtual_resolution.x * "+Math.PI+"));" : "") + "
|
"val = abs(sin(coords.x * virtual_resolution.x * "+Math.PI+"));
|
||||||
|
result *= mix(val, " + absSinAvg + ", rasterizationSmooth.x);" : "") + "
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -261,7 +272,7 @@ ShaderEffect {
|
|||||||
color += noiseVal * noise * (1.0 - distance * 1.3);" : "") +
|
color += noiseVal * noise * (1.0 - distance * 1.3);" : "") +
|
||||||
|
|
||||||
(glowingLine !== 0 ? "
|
(glowingLine !== 0 ? "
|
||||||
color += randomPass(coords) * glowingLine;" : "") +
|
color += randomPass(coords * virtual_resolution) * glowingLine;" : "") +
|
||||||
|
|
||||||
"vec3 txt_color = texture2D(source, txt_coords).rgb;" +
|
"vec3 txt_color = texture2D(source, txt_coords).rgb;" +
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import QtQuick 2.2
|
|||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 1.1
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
|
import "Components"
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
property alias value: slider.value
|
property alias value: slider.value
|
||||||
property alias stepSize: slider.stepSize
|
property alias stepSize: slider.stepSize
|
||||||
@@ -36,15 +38,7 @@ RowLayout {
|
|||||||
stepSize: parent.stepSize
|
stepSize: parent.stepSize
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Text{
|
SizedLabel{
|
||||||
id: textfield
|
text: Math.round(value * maxMultiplier) + "%"
|
||||||
text: formatNumber(Math.round(value * maxMultiplier))
|
|
||||||
}
|
|
||||||
function formatNumber(num) {
|
|
||||||
var n = "" + num;
|
|
||||||
while (n.length < 3) {
|
|
||||||
n = " " + n;
|
|
||||||
}
|
|
||||||
return n + "%";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
|
import "utils.js" as Utils
|
||||||
|
|
||||||
ShaderTerminal{
|
ShaderTerminal{
|
||||||
property alias title: terminal.title
|
property alias title: terminal.title
|
||||||
property alias terminalSize: terminal.terminalSize
|
property alias terminalSize: terminal.terminalSize
|
||||||
@@ -45,9 +47,10 @@ ShaderTerminal{
|
|||||||
asynchronous: true
|
asynchronous: true
|
||||||
width: parent.width * appSettings.bloomQuality
|
width: parent.width * appSettings.bloomQuality
|
||||||
height: parent.height * appSettings.bloomQuality
|
height: parent.height * appSettings.bloomQuality
|
||||||
|
|
||||||
sourceComponent: FastBlur{
|
sourceComponent: FastBlur{
|
||||||
radius: 48 * appSettings.bloomQuality * appSettings.windowScaling
|
radius: Utils.lint(16, 48, appSettings.bloomQuality * appSettings.windowScaling);
|
||||||
source: terminal.mainTerminal
|
source: terminal.mainSource
|
||||||
transparentBorder: true
|
transparentBorder: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,8 +70,8 @@ ShaderTerminal{
|
|||||||
bloomSource: bloomSourceLoader.item
|
bloomSource: bloomSourceLoader.item
|
||||||
|
|
||||||
// This shader might be useful in the future. Since we used it only for a couple
|
// This shader might be useful in the future. Since we used it only for a couple
|
||||||
// of calculations is probably best to move those in the main shader. If in
|
// of calculations is probably best to move those in the main shader. If in the future
|
||||||
// we will need to store another fullScreen channel this might be handy.
|
// we need to store another fullScreen channel this might be handy.
|
||||||
|
|
||||||
// ShaderEffect {
|
// ShaderEffect {
|
||||||
// id: rasterizationEffect
|
// id: rasterizationEffect
|
||||||
|
|||||||
BIN
app/qml/fonts/modern-fixedsys-excelsior/FSEX301-L2.ttf
Normal file
@@ -83,7 +83,7 @@ Item{
|
|||||||
sourceComponent: FastBlur{
|
sourceComponent: FastBlur{
|
||||||
id: frameReflectionEffect
|
id: frameReflectionEffect
|
||||||
radius: 128
|
radius: 128
|
||||||
source: terminal.kterminal
|
source: terminal.mainSource
|
||||||
smooth: false
|
smooth: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,5 +50,8 @@
|
|||||||
<file>fonts/modern-envy-code-r/Envy Code R.ttf</file>
|
<file>fonts/modern-envy-code-r/Envy Code R.ttf</file>
|
||||||
<file>fonts/modern-inconsolata/Inconsolata.otf</file>
|
<file>fonts/modern-inconsolata/Inconsolata.otf</file>
|
||||||
<file>SettingsScreenTab.qml</file>
|
<file>SettingsScreenTab.qml</file>
|
||||||
|
<file>fonts/modern-fixedsys-excelsior/FSEX301-L2.ttf</file>
|
||||||
|
<file>../icons/32x32/cool-retro-term.png</file>
|
||||||
|
<file>Components/SizedLabel.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
.pragma library
|
.pragma library
|
||||||
|
function clamp(x, min, max) {
|
||||||
|
if (x <= min)
|
||||||
|
return min;
|
||||||
|
if (x >= max)
|
||||||
|
return max;
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
function lint(a, b, t) {
|
||||||
|
return (1 - t) * a + (t) * b;
|
||||||
|
}
|
||||||
function mix(c1, c2, alpha){
|
function mix(c1, c2, alpha){
|
||||||
return Qt.rgba(c1.r * alpha + c2.r * (1-alpha),
|
return Qt.rgba(c1.r * alpha + c2.r * (1-alpha),
|
||||||
c1.g * alpha + c2.g * (1-alpha),
|
c1.g * alpha + c2.g * (1-alpha),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Comment=Use the command line the old way
|
Comment=Use the command line the old way
|
||||||
Exec=cool-retro-term
|
Exec=cool-retro-term
|
||||||
GenericName=Terminal emulator
|
GenericName=Terminal emulator
|
||||||
Icon=utilities-terminal
|
Icon=cool-retro-term
|
||||||
MimeType=
|
MimeType=
|
||||||
Name=Cool Retro Term
|
Name=Cool Retro Term
|
||||||
Categories=Qt;System;Utility;TerminalEmulator;
|
Categories=Qt;System;Utility;TerminalEmulator;
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
|
|
||||||
Name: cool-retro-term
|
Name: cool-retro-term
|
||||||
Summary: Cool Retro Terminal
|
Summary: Cool Retro Terminal
|
||||||
Version: 0.9
|
Version: 1.0
|
||||||
Release: 0%{?dist}
|
Release: 0%{?dist}
|
||||||
Group: System/X11/Terminals
|
Group: System/X11/Terminals
|
||||||
License: GPLv3
|
License: GPL-3.0+
|
||||||
URL: https://github.com/Swordfish90/cool-retro-term
|
URL: https://github.com/Swordfish90/cool-retro-term
|
||||||
|
|
||||||
# For this spec file to work, the cool-retro-term sources must be located
|
# For this spec file to work, the cool-retro-term sources must be located
|
||||||
@@ -82,9 +82,7 @@ desktop-file-install \
|
|||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_libdir}/qt5/qml/
|
%{_libdir}/qt5/qml/
|
||||||
%{_datadir}/applications/%{name}.desktop
|
%{_datadir}/applications/%{name}.desktop
|
||||||
# FIXME: Icon
|
%{_datadir}/icons/hicolor/*/*/*
|
||||||
# %{_datadir}/pixmaps/%{name}.png
|
|
||||||
# %{_datadir}/icons/hicolor/*/*/*
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|||||||