* updated ksmtp (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / x11 / cool-retro-term / blinking-cursor.patch
blob12f338aea7b567fea865dca634bcb0bc3909833c
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../cool-retro-term/blinking-cursor.patch
5 # Copyright (C) 2020 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 From 9960b25dff271249fc774f222be799a2d87c36cb Mon Sep 17 00:00:00 2001
18 From: Kristian <ga53jey@mytum.de>
19 Date: Mon, 8 Jul 2019 15:21:17 +0200
20 Subject: [PATCH] Add support for blinking cursor
22 ---
23 app/qml/ApplicationSettings.qml | 7 ++++++-
24 app/qml/PreprocessedTerminal.qml | 1 +
25 app/qml/SettingsTerminalTab.qml | 18 ++++++++++++++++++
26 3 files changed, 25 insertions(+), 1 deletion(-)
28 diff --git a/app/qml/ApplicationSettings.qml b/app/qml/ApplicationSettings.qml
29 index 11d4330..412af96 100644
30 --- a/app/qml/ApplicationSettings.qml
31 +++ b/app/qml/ApplicationSettings.qml
32 @@ -59,6 +59,8 @@ QtObject{
33 property real burnInQuality: 0.5
34 property bool useFastBurnIn: Qt.platform.os === "osx" ? false : true
36 + property bool blinkingCursor: true
38 onWindowScalingChanged: handleFontChanged();
40 // PROFILE SETTINGS ///////////////////////////////////////////////////////
41 @@ -208,7 +210,8 @@ QtObject{
42 burnInQuality: burnInQuality,
43 useCustomCommand: useCustomCommand,
44 customCommand: customCommand,
45 - useFastBurnIn: useFastBurnIn
46 + useFastBurnIn: useFastBurnIn,
47 + blinkingCursor: blinkingCursor
49 return stringify(settings);
51 @@ -296,6 +299,8 @@ QtObject{
52 customCommand = settings.customCommand !== undefined ? settings.customCommand : customCommand
54 useFastBurnIn = settings.useFastBurnIn !== undefined ? settings.useFastBurnIn : useFastBurnIn;
56 + blinkingCursor = settings.blinkingCursor !== undefined ? settings.blinkingCursor : blinkingCursor
59 function loadProfileString(profileString){
60 diff --git a/app/qml/PreprocessedTerminal.qml b/app/qml/PreprocessedTerminal.qml
61 index d0d9cee..cb8698c 100644
62 --- a/app/qml/PreprocessedTerminal.qml
63 +++ b/app/qml/PreprocessedTerminal.qml
64 @@ -94,6 +94,7 @@ Item{
65 smooth: !appSettings.lowResolutionFont
66 enableBold: false
67 fullCursorHeight: true
68 + blinkingCursor: appSettings.blinkingCursor
70 session: QMLTermSession {
71 id: ksession
72 diff --git a/app/qml/SettingsTerminalTab.qml b/app/qml/SettingsTerminalTab.qml
73 index 8cefdb8..914a90c 100644
74 --- a/app/qml/SettingsTerminalTab.qml
75 +++ b/app/qml/SettingsTerminalTab.qml
76 @@ -114,6 +114,24 @@ Tab{
80 + GroupBox{
81 + title: qsTr("Cursor")
82 + Layout.fillWidth: true
83 + ColumnLayout {
84 + anchors.fill: parent
85 + CheckBox{
86 + id: blinkingCursor
87 + text: qsTr("Blinking Cursor")
88 + checked: appSettings.blinkingCursor
89 + onCheckedChanged: appSettings.blinkingCursor = checked
90 + }
91 + Binding{
92 + target: blinkingCursor
93 + property: "checked"
94 + value: appSettings.blinkingCursor
95 + }
96 + }
97 + }
98 GroupBox{
99 title: qsTr("Colors")
100 Layout.fillWidth: true
101 From 8c1293e985f70688c7190e30a87ad1af26ad6a90 Mon Sep 17 00:00:00 2001
102 From: Kristian Klemon <kristian.klemon@gmail.com>
103 Date: Wed, 6 May 2020 16:39:48 +0200
104 Subject: [PATCH] Add blinkingCursor property (#25)
106 Co-authored-by: Kristian <ga53jey@mytum.de>
108 lib/TerminalDisplay.cpp | 3 +++
109 lib/TerminalDisplay.h | 2 ++
110 2 files changed, 5 insertions(+)
112 diff --git a/lib/TerminalDisplay.cpp b/lib/TerminalDisplay.cpp
113 index 04d54c0..87a384e 100644
114 --- a/qmltermwidget/lib/TerminalDisplay.cpp
115 +++ b/qmltermwidget/lib/TerminalDisplay.cpp
116 @@ -1302,6 +1302,9 @@ void TerminalDisplay::showResizeNotification()
118 void TerminalDisplay::setBlinkingCursor(bool blink)
120 + if (_hasBlinkingCursor != blink)
121 + emit blinkingCursorStateChanged();
123 _hasBlinkingCursor=blink;
125 if (blink && !_blinkCursorTimer->isActive())
126 diff --git a/lib/TerminalDisplay.h b/lib/TerminalDisplay.h
127 index 3535756..d8371d8 100644
128 --- a/qmltermwidget/lib/TerminalDisplay.h
129 +++ b/qmltermwidget/lib/TerminalDisplay.h
130 @@ -99,6 +99,7 @@ class KONSOLEPRIVATE_EXPORT TerminalDisplay : public QQuickPaintedItem
132 Q_PROPERTY(bool enableBold READ getBoldIntense WRITE setBoldIntense NOTIFY boldIntenseChanged )
133 Q_PROPERTY(bool fullCursorHeight READ fullCursorHeight WRITE setFullCursorHeight NOTIFY fullCursorHeightChanged)
134 + Q_PROPERTY(bool blinkingCursor READ blinkingCursor WRITE setBlinkingCursor NOTIFY blinkingCursorStateChanged)
135 Q_PROPERTY(bool antialiasText READ antialias WRITE setAntialias)
136 Q_PROPERTY(QStringList availableColorSchemes READ availableColorSchemes NOTIFY availableColorSchemesChanged)
138 @@ -615,6 +616,7 @@ public slots:
139 void availableColorSchemesChanged();
140 void colorSchemeChanged();
141 void fullCursorHeightChanged();
142 + void blinkingCursorStateChanged();
143 void boldIntenseChanged();
145 protected: