mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-22 12:58:39 +00:00
Refactor main and terminal container.
This commit is contained in:
parent
dcb332b06f
commit
6b9a2ed5d2
@ -1,44 +1,20 @@
|
|||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
|
|
||||||
Item{
|
ShaderTerminal{
|
||||||
property alias title: terminal.title
|
property alias title: terminal.title
|
||||||
|
property alias terminalSize: terminal.terminalSize
|
||||||
|
|
||||||
Item{
|
id: shadercontainer
|
||||||
id: scalableContent
|
opacity: shadersettings.windowOpacity * 0.3 + 0.7
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
transform: Scale {
|
|
||||||
xScale: 1 / shadersettings.window_scaling
|
|
||||||
yScale: 1 / shadersettings.window_scaling
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Terminal size overlay. Shown when terminal size changes.
|
|
||||||
Loader{
|
Loader{
|
||||||
id: sizeoverlayloader
|
id: frame
|
||||||
z: 3
|
anchors.fill: parent
|
||||||
anchors.centerIn: parent
|
z: 2.1
|
||||||
active: shadersettings.show_terminal_size
|
source: shadersettings.frame_source
|
||||||
sourceComponent: SizeOverlay{
|
}
|
||||||
terminalSize: terminal.terminalSize
|
PreprocessedTerminal{
|
||||||
}
|
id: terminal
|
||||||
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,13 @@ ApplicationWindow{
|
|||||||
}
|
}
|
||||||
TerminalContainer{
|
TerminalContainer{
|
||||||
id: terminalContainer
|
id: terminalContainer
|
||||||
anchors.fill: parent
|
width: parent.width * shadersettings.window_scaling
|
||||||
|
height: parent.height * shadersettings.window_scaling
|
||||||
|
|
||||||
|
transform: Scale {
|
||||||
|
xScale: 1 / shadersettings.window_scaling
|
||||||
|
yScale: 1 / shadersettings.window_scaling
|
||||||
|
}
|
||||||
}
|
}
|
||||||
SettingsWindow{
|
SettingsWindow{
|
||||||
id: settingswindow
|
id: settingswindow
|
||||||
@ -120,5 +126,13 @@ ApplicationWindow{
|
|||||||
id: aboutDialog
|
id: aboutDialog
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
Loader{
|
||||||
|
anchors.centerIn: parent
|
||||||
|
active: shadersettings.show_terminal_size
|
||||||
|
sourceComponent: SizeOverlay{
|
||||||
|
z: 3
|
||||||
|
terminalSize: terminalContainer.terminalSize
|
||||||
|
}
|
||||||
|
}
|
||||||
Component.onCompleted: shadersettings.handleFontChanged();
|
Component.onCompleted: shadersettings.handleFontChanged();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user