1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2024-10-06 02:50:50 +01:00

Merge branch 'unstable'

This commit is contained in:
Filippo Scognamiglio 2014-07-11 00:40:22 +02:00
commit cbdf73d713
5 changed files with 36 additions and 21 deletions

View File

@ -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: {

View File

@ -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) + "%"}
}

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.0.1, 2014-07-09T00:22:58. -->
<!-- Written by QtCreator 3.0.1, 2014-07-10T23:48:14. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>

View File

@ -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
}
}

View File

@ -95,6 +95,15 @@ ApplicationWindow{
id: shadersettings
}
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,
@ -105,14 +114,12 @@ ApplicationWindow{
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);
}
}
Item{
id: maincontainer
anchors.centerIn: parent
width: parent.width * shadersettings.window_scaling
height: parent.height * shadersettings.window_scaling
scale: 1.0 / shadersettings.window_scaling
Image{
id: randtexture
source: "frames/images/randfunction.png"