mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-20 20:09:14 +00:00
REmoved bold fonts (caused problems rasterization), using custom greyscale color scheme (applications that use colors are now useable).
This commit is contained in:
parent
9eee62b3a4
commit
f1dc94fab2
@ -75,7 +75,7 @@ Item{
|
||||
id: kterminal
|
||||
anchors.fill: parent
|
||||
|
||||
colorScheme: "MyWhiteOnBlack"
|
||||
colorScheme: "cool-old-term"
|
||||
|
||||
session: KSession {
|
||||
id: ksession
|
||||
@ -245,7 +245,8 @@ Item{
|
||||
coords.x = floor(virtual_resolution.x * coords.x) / virtual_resolution.x;" : "")
|
||||
: "") +
|
||||
"coords = coords + delta;" +
|
||||
"float color = texture2D(source, coords).r * 256.0;" +
|
||||
"vec4 vcolor = texture2D(source, coords).r * 256.0;
|
||||
float color = vcolor.r * 0.21 + vcolor.g * 0.72 + vcolor.b + 0.04;" +
|
||||
(mBlur !== 0 ?
|
||||
"float blurredSourceColor = texture2D(blurredSource, coords).a * 256.0;" +
|
||||
"blurredSourceColor = blurredSourceColor - blurredSourceColor * " + (1.0 - motionBlurCoefficient) * fpsAttenuation+ ";" +
|
||||
@ -267,7 +268,7 @@ Item{
|
||||
active: mBloom != 0
|
||||
anchors.fill: parent
|
||||
sourceComponent: FastBlur{
|
||||
radius: 32
|
||||
radius: 48
|
||||
source: kterminal
|
||||
transparentBorder: true
|
||||
smooth: false
|
||||
|
@ -1,42 +0,0 @@
|
||||
# example scheme for konsole
|
||||
|
||||
# the title is to appear in the menu.
|
||||
|
||||
title White on Black
|
||||
|
||||
# foreground colors
|
||||
|
||||
# note that the default background color is flagged
|
||||
# to become transparent when an image is present.
|
||||
|
||||
# slot transparent bold
|
||||
# | | |
|
||||
# V V--color--V V V
|
||||
|
||||
color 0 255 255 255 0 0 # regular foreground color (White)
|
||||
color 1 0 0 0 1 0 # regular background color (Black)
|
||||
|
||||
color 2 0 0 0 0 0 # regular color 0 Black
|
||||
color 3 255 255 255 0 0 # regular color 1 Red
|
||||
color 4 255 255 255 0 0 # regular color 2 Green
|
||||
color 5 255 255 255 0 0 # regular color 3 Yellow
|
||||
color 6 255 255 255 0 0 # regular color 4 Blue
|
||||
color 7 255 255 255 0 0 # regular color 5 Magenta
|
||||
color 8 255 255 255 0 0 # regular color 6 Cyan
|
||||
color 9 255 255 255 0 0 # regular color 7 White
|
||||
|
||||
# intensive colors
|
||||
|
||||
# instead of changing the colors, we've flaged the text to become bold
|
||||
|
||||
color 10 255 255 255 0 1 # intensive foreground color
|
||||
color 11 0 0 0 1 0 # intensive background color
|
||||
|
||||
color 12 255 255 255 0 0 # intensive color 0
|
||||
color 13 255 255 255 0 0 # intensive color 1
|
||||
color 14 255 255 255 0 0 # intensive color 2
|
||||
color 15 255 255 255 0 0 # intensive color 3
|
||||
color 16 255 255 255 0 0 # intensive color 4
|
||||
color 17 255 255 255 0 0 # intensive color 5
|
||||
color 18 255 255 255 0 0 # intensive color 6
|
||||
color 19 255 255 255 0 0 # intensive color 7
|
@ -0,0 +1,31 @@
|
||||
import sys
|
||||
|
||||
__, inpath, outpath = sys.argv
|
||||
|
||||
def interpolate(color, minim):
|
||||
return minim + (color / 255) * (255 - minim)
|
||||
|
||||
def rgb2grey(r, g, b):
|
||||
return round(0.21 * r + 0.72 * g + 0.07 * b)
|
||||
|
||||
infile = open(inpath, "r")
|
||||
outfile = open(outpath, "w")
|
||||
|
||||
lines = infile.readlines()
|
||||
|
||||
def process_line(line):
|
||||
if not line.startswith("color"): return line
|
||||
chunks = [l for l in line.split(" ") if l]
|
||||
color = rgb2grey(int(chunks[2]), int(chunks[3]), int(chunks[4]))
|
||||
if color != 0:
|
||||
color = int(interpolate(color, 5))
|
||||
chunks[2] = str(color)
|
||||
chunks[3] = str(color)
|
||||
chunks[4] = str(color)
|
||||
return ' '.join(chunks)
|
||||
|
||||
for l in (process_line(l) for l in lines):
|
||||
outfile.write(l + '\n')
|
||||
|
||||
infile.close()
|
||||
outfile.close()
|
84
konsole-qml-plugin/assets/color-schemes/cool-old-term.schema
Normal file
84
konsole-qml-plugin/assets/color-schemes/cool-old-term.schema
Normal file
@ -0,0 +1,84 @@
|
||||
# example scheme for konsole
|
||||
|
||||
|
||||
|
||||
# the title is to appear in the menu.
|
||||
|
||||
|
||||
|
||||
title White on Black
|
||||
|
||||
|
||||
|
||||
# foreground colors
|
||||
|
||||
|
||||
|
||||
# note that the default background color is flagged
|
||||
|
||||
# to become transparent when an image is present.
|
||||
|
||||
|
||||
|
||||
# slot transparent bold
|
||||
|
||||
# | | |
|
||||
|
||||
# V V--color--V V V
|
||||
|
||||
|
||||
|
||||
color 0 255 255 255 0 0 # regular foreground color (White)
|
||||
|
||||
color 1 0 0 0 1 0 # regular background color (Black)
|
||||
|
||||
|
||||
|
||||
color 2 0 0 0 0 0 # regular color 0 Black
|
||||
|
||||
color 3 59 59 59 0 0 # regular color 1 Red
|
||||
|
||||
color 4 137 137 137 0 0 # regular color 2 Green
|
||||
|
||||
color 5 116 116 116 0 0 # regular color 3 Yellow
|
||||
|
||||
color 6 39 39 39 0 0 # regular color 4 Blue
|
||||
|
||||
color 7 70 70 70 0 0 # regular color 5 Magenta
|
||||
|
||||
color 8 148 148 148 0 0 # regular color 6 Cyan
|
||||
|
||||
color 9 179 179 179 0 0 # regular color 7 White
|
||||
|
||||
|
||||
|
||||
# intensive colors
|
||||
|
||||
|
||||
|
||||
# instead of changing the colors, we've flaged the text to become bold
|
||||
|
||||
|
||||
|
||||
color 10 255 255 255 0 1 # intensive foreground color
|
||||
|
||||
color 11 0 0 0 1 0 # intensive background color
|
||||
|
||||
|
||||
|
||||
color 12 106 106 106 0 0 # intensive color 0
|
||||
|
||||
color 13 122 122 122 0 0 # intensive color 1
|
||||
|
||||
color 14 207 207 207 0 0 # intensive color 2
|
||||
|
||||
color 15 243 243 243 0 0 # intensive color 3
|
||||
|
||||
color 16 99 99 99 0 0 # intensive color 4
|
||||
|
||||
color 17 134 134 134 0 0 # intensive color 5
|
||||
|
||||
color 18 219 219 219 0 0 # intensive color 6
|
||||
|
||||
color 19 255 255 255 0 0 # intensive color 7
|
||||
|
@ -129,7 +129,7 @@ KTerminalDisplay::KTerminalDisplay(QQuickItem *parent) :
|
||||
,_fontHeight(1)
|
||||
,_fontWidth(1)
|
||||
,_fontAscent(1)
|
||||
,_boldIntense(true)
|
||||
,_boldIntense(false)
|
||||
,_lines(1)
|
||||
,_columns(1)
|
||||
,_usedLines(1)
|
||||
@ -1971,7 +1971,7 @@ void KTerminalDisplay::drawCharacters(QPainter* painter,
|
||||
if ( font.bold() != useBold
|
||||
|| font.underline() != useUnderline )
|
||||
{
|
||||
font.setBold(useBold);
|
||||
//font.setBold(useBold);
|
||||
font.setUnderline(useUnderline);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user