Adding adjustable scanline quality. Textures are now always smoothed. Terminal texture is now scaled (by integer factors) depending on the scaling level.
This commit is contained in:
@@ -84,6 +84,8 @@ Item{
|
||||
|
||||
colorScheme: "cool-retro-term"
|
||||
|
||||
smooth: false
|
||||
|
||||
session: KSession {
|
||||
id: ksession
|
||||
kbScheme: "xterm"
|
||||
@@ -109,6 +111,12 @@ Item{
|
||||
width = Qt.binding(function() {return Math.floor(fontWidth * terminalContainer.width / screenScaling);});
|
||||
height = Qt.binding(function() {return Math.floor(terminalContainer.height / screenScaling);});
|
||||
|
||||
var scaleTexture = Math.max(Math.round(screenScaling / shadersettings.scanline_quality), 1.0);
|
||||
|
||||
kterminalSource.textureSize = Qt.binding(function () {
|
||||
return Qt.size(kterminal.width * scaleTexture, kterminal.height * scaleTexture);
|
||||
});
|
||||
|
||||
setLineSpacing(lineSpacing);
|
||||
update();
|
||||
restartBlurredSource();
|
||||
@@ -176,7 +184,6 @@ Item{
|
||||
id: kterminalSource
|
||||
sourceItem: kterminal
|
||||
hideSource: true
|
||||
smooth: mScanlines == shadersettings.no_rasterization
|
||||
wrapMode: ShaderEffectSource.ClampToEdge
|
||||
live: false
|
||||
|
||||
@@ -202,8 +209,6 @@ Item{
|
||||
hideSource: true
|
||||
wrapMode: kterminalSource.wrapMode
|
||||
|
||||
smooth: mScanlines == shadersettings.no_rasterization
|
||||
|
||||
function restartBlurSource(){
|
||||
livetimer.restart();
|
||||
}
|
||||
@@ -230,12 +235,17 @@ Item{
|
||||
livetimer.restart();
|
||||
}
|
||||
}
|
||||
Connections{
|
||||
target: shadersettings
|
||||
onScanline_qualityChanged: restartBlurredSource();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loader{
|
||||
id: blurredTerminalLoader
|
||||
anchors.fill: kterminal
|
||||
width: kterminalSource.textureSize.width
|
||||
height: kterminalSource.textureSize.height
|
||||
active: mBlur !== 0
|
||||
|
||||
sourceComponent: ShaderEffect {
|
||||
|
||||
Reference in New Issue
Block a user