diff --git a/app/PreprocessedTerminal.qml b/app/PreprocessedTerminal.qml index 2472422..2126189 100644 --- a/app/PreprocessedTerminal.qml +++ b/app/PreprocessedTerminal.qml @@ -107,12 +107,12 @@ Item{ ? virtualCharSize : Qt.size(paintedSize.width / 2, paintedSize.height / 2); - var virtualPxSize = Qt.size(paintedSize.width / charSize.width, - paintedSize.height / charSize.height) + var virtualPxSize = Qt.size((paintedSize.width / charSize.width) * shadersettings.window_scaling, + (paintedSize.height / charSize.height) * shadersettings.window_scaling) terminalContainer.virtualPxSize = virtualPxSize; - setLineSpacing(lineSpacing); + setLineSpacing(lineSpacing * shadersettings.window_scaling); restartBlurredSource(); } Component.onCompleted: { diff --git a/app/SettingsGeneralTab.qml b/app/SettingsGeneralTab.qml index 30ab7dd..3184138 100644 --- a/app/SettingsGeneralTab.qml +++ b/app/SettingsGeneralTab.qml @@ -128,11 +128,12 @@ Tab{ Slider{ Layout.fillWidth: true id: txtslider - stepSize: 0.01 + stepSize: 0.25 maximumValue: 1 - minimumValue: 0 + minimumValue: 0.50 onValueChanged: shadersettings.window_scaling = value; value: shadersettings.window_scaling + tickmarksEnabled: true } Text{text: Math.round(txtslider.value * 100) + "%"} } diff --git a/app/app.qmlproject.user b/app/app.qmlproject.user index 4f5be78..15f913f 100644 --- a/app/app.qmlproject.user +++ b/app/app.qmlproject.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/app/frames/utils/TerminalFrame.qml b/app/frames/utils/TerminalFrame.qml index 3735bc4..0406b48 100644 --- a/app/frames/utils/TerminalFrame.qml +++ b/app/frames/utils/TerminalFrame.qml @@ -2,6 +2,9 @@ import QtQuick 2.2 Item{ id: framecontainer + property int textureWidth + property int textureHeight + property int addedWidth property int addedHeight property int borderLeft @@ -28,8 +31,8 @@ Item{ BorderImage{ id: frameimage anchors.centerIn: parent - width: parent.width + addedWidth - height: parent.height + addedHeight + width: textureWidth + addedWidth + height: textureHeight + addedHeight border.bottom: borderBottom border.top: borderTop @@ -57,14 +60,18 @@ Item{ id: framesource sourceItem: frameimage hideSource: true + textureSize: Qt.size(parent.width, parent.height) } ShaderEffectSource{ id: framesourcenormals sourceItem: framenormals hideSource: true + textureSize: Qt.size(parent.width, parent.height) } Loader{ - anchors.fill: frameimage + anchors.centerIn: parent + width: parent.width + (addedWidth / textureWidth) * parent.width + height: parent.height + (addedHeight / textureHeight) * parent.height source: shaderString } } diff --git a/app/main.qml b/app/main.qml index ad87824..9f312e8 100644 --- a/app/main.qml +++ b/app/main.qml @@ -95,24 +95,31 @@ ApplicationWindow{ id: shadersettings } - Loader{ - id: frame - property rect sourceRect: Qt.rect(-item.rectX * shadersettings.window_scaling, - -item.rectY * shadersettings.window_scaling, - terminal.width + 2*item.rectX * shadersettings.window_scaling, - terminal.height + 2*item.rectY * shadersettings.window_scaling) - anchors.fill: parent - z: 2.1 - source: shadersettings.frame_source - opacity: 1.0 - } - Item{ id: maincontainer anchors.centerIn: parent width: parent.width * shadersettings.window_scaling height: parent.height * shadersettings.window_scaling scale: 1.0 / shadersettings.window_scaling + smooth: false + antialiasing: false + + Loader{ + id: frame + property rect sourceRect: Qt.rect(-item.rectX * shadersettings.window_scaling, + -item.rectY * shadersettings.window_scaling, + terminal.width + 2*item.rectX * shadersettings.window_scaling, + terminal.height + 2*item.rectY * shadersettings.window_scaling) + anchors.fill: parent + z: 2.1 + source: shadersettings.frame_source + opacity: 1.0 + onLoaded: { + item.textureWidth = Qt.binding(function() { return terminalWindow.width;}) + item.textureHeight = Qt.binding(function () {return terminalWindow.height;}) + console.log(terminalWindow.width); + } + } Image{ id: randtexture source: "frames/images/randfunction.png"