From 30cc2a5e9c41ce3fec445cf336e1a7dc5d6bf737 Mon Sep 17 00:00:00 2001 From: Filippo Scognamiglio Date: Fri, 12 Dec 2014 00:59:23 +0100 Subject: [PATCH] Refactor: texture scaling is now slightly better organized. --- app/qml/PreprocessedTerminal.qml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/qml/PreprocessedTerminal.qml b/app/qml/PreprocessedTerminal.qml index e95cf8f..3375e30 100644 --- a/app/qml/PreprocessedTerminal.qml +++ b/app/qml/PreprocessedTerminal.qml @@ -30,6 +30,7 @@ Item{ property alias mainTerminal: kterminal property ShaderEffectSource mainSource: mBlur !== 0 ? blurredSourceLoader.item : kterminalSource + property real scaleTexture: 1.0 property alias title: ksession.title property alias kterminal: kterminal @@ -114,14 +115,9 @@ 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 / appSettings.scanline_quality), 1.0); - - kterminalSource.textureSize = Qt.binding(function () { - return Qt.size(kterminal.width * scaleTexture, kterminal.height * scaleTexture); - }); + scaleTexture = Math.max(Math.round(screenScaling / appSettings.scanline_quality), 1.0); kterminal.lineSpacing = lineSpacing; - //update(); } Component.onCompleted: { appSettings.terminalFontChanged.connect(handleFontChange); @@ -195,6 +191,7 @@ Item{ hideSource: true wrapMode: ShaderEffectSource.ClampToEdge visible: false + textureSize: Qt.size(kterminal.width * scaleTexture, kterminal.height * scaleTexture); } Loader{ id: blurredSourceLoader