mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-11-01 15:42:12 +00:00
Texture quality is actually working. (And also quite useful for high-dpi screens).
This commit is contained in:
55
app/qml/TerminalContainer.qml
Normal file
55
app/qml/TerminalContainer.qml
Normal file
@@ -0,0 +1,55 @@
|
||||
import QtQuick 2.2
|
||||
|
||||
Item{
|
||||
Item{
|
||||
id: scalableContent
|
||||
width: parent.width * shadersettings.window_scaling
|
||||
height: parent.height * shadersettings.window_scaling
|
||||
|
||||
Loader{
|
||||
id: frame
|
||||
anchors.fill: parent
|
||||
z: 2.1
|
||||
source: shadersettings.frame_source
|
||||
}
|
||||
PreprocessedTerminal{
|
||||
id: terminal
|
||||
anchors.fill: parent
|
||||
}
|
||||
ShaderTerminal{
|
||||
id: shadercontainer
|
||||
anchors.fill: parent
|
||||
opacity: shadersettings.windowOpacity * 0.3 + 0.7
|
||||
z: 1.9
|
||||
}
|
||||
}
|
||||
|
||||
// This is used to render the texture to a lower resolution then scale it up.
|
||||
Loader{
|
||||
id: scalableContentSource
|
||||
active: shadersettings.window_scaling < 1
|
||||
sourceComponent: ShaderEffectSource{
|
||||
sourceItem: scalableContent
|
||||
hideSource: true
|
||||
smooth: true
|
||||
}
|
||||
}
|
||||
Loader{
|
||||
active: shadersettings.window_scaling < 1
|
||||
anchors.fill: parent
|
||||
sourceComponent: ShaderEffect{
|
||||
property var source: scalableContentSource.item
|
||||
}
|
||||
}
|
||||
|
||||
// Terminal size overlay. Shown when terminal size changes.
|
||||
Loader{
|
||||
id: sizeoverlayloader
|
||||
z: 3
|
||||
anchors.centerIn: parent
|
||||
active: shadersettings.show_terminal_size
|
||||
sourceComponent: SizeOverlay{
|
||||
terminalSize: terminal.terminalSize
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user