mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-22 04:49:02 +00:00
Refactor: texture scaling is now slightly better organized.
This commit is contained in:
parent
6eb3e814fe
commit
30cc2a5e9c
@ -30,6 +30,7 @@ Item{
|
|||||||
property alias mainTerminal: kterminal
|
property alias mainTerminal: kterminal
|
||||||
property ShaderEffectSource mainSource: mBlur !== 0 ? blurredSourceLoader.item : kterminalSource
|
property ShaderEffectSource mainSource: mBlur !== 0 ? blurredSourceLoader.item : kterminalSource
|
||||||
|
|
||||||
|
property real scaleTexture: 1.0
|
||||||
property alias title: ksession.title
|
property alias title: ksession.title
|
||||||
property alias kterminal: kterminal
|
property alias kterminal: kterminal
|
||||||
|
|
||||||
@ -114,14 +115,9 @@ Item{
|
|||||||
width = Qt.binding(function() {return Math.floor(fontWidth * terminalContainer.width / screenScaling);});
|
width = Qt.binding(function() {return Math.floor(fontWidth * terminalContainer.width / screenScaling);});
|
||||||
height = Qt.binding(function() {return Math.floor(terminalContainer.height / screenScaling);});
|
height = Qt.binding(function() {return Math.floor(terminalContainer.height / screenScaling);});
|
||||||
|
|
||||||
var scaleTexture = Math.max(Math.round(screenScaling / appSettings.scanline_quality), 1.0);
|
scaleTexture = Math.max(Math.round(screenScaling / appSettings.scanline_quality), 1.0);
|
||||||
|
|
||||||
kterminalSource.textureSize = Qt.binding(function () {
|
|
||||||
return Qt.size(kterminal.width * scaleTexture, kterminal.height * scaleTexture);
|
|
||||||
});
|
|
||||||
|
|
||||||
kterminal.lineSpacing = lineSpacing;
|
kterminal.lineSpacing = lineSpacing;
|
||||||
//update();
|
|
||||||
}
|
}
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
appSettings.terminalFontChanged.connect(handleFontChange);
|
appSettings.terminalFontChanged.connect(handleFontChange);
|
||||||
@ -195,6 +191,7 @@ Item{
|
|||||||
hideSource: true
|
hideSource: true
|
||||||
wrapMode: ShaderEffectSource.ClampToEdge
|
wrapMode: ShaderEffectSource.ClampToEdge
|
||||||
visible: false
|
visible: false
|
||||||
|
textureSize: Qt.size(kterminal.width * scaleTexture, kterminal.height * scaleTexture);
|
||||||
}
|
}
|
||||||
Loader{
|
Loader{
|
||||||
id: blurredSourceLoader
|
id: blurredSourceLoader
|
||||||
|
Loading…
x
Reference in New Issue
Block a user