mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-11-04 09:02:14 +00:00 
			
		
		
		
	Refactor main and terminal container.
This commit is contained in:
		@@ -1,12 +1,11 @@
 | 
				
			|||||||
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{
 | 
					    Loader{
 | 
				
			||||||
        id: frame
 | 
					        id: frame
 | 
				
			||||||
@@ -18,27 +17,4 @@ Item{
 | 
				
			|||||||
        id: terminal
 | 
					        id: terminal
 | 
				
			||||||
        anchors.fill: parent
 | 
					        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{
 | 
					 | 
				
			||||||
        id: sizeoverlayloader
 | 
					 | 
				
			||||||
        z: 3
 | 
					 | 
				
			||||||
        anchors.centerIn: parent
 | 
					 | 
				
			||||||
        active: shadersettings.show_terminal_size
 | 
					 | 
				
			||||||
        sourceComponent: SizeOverlay{
 | 
					 | 
				
			||||||
            terminalSize: terminal.terminalSize
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user