mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-11-04 00:52:11 +00:00 
			
		
		
		
	Merge pull request #192 from Swordfish90/unstable
Disable antialias when using rasterization. Fix windows raise behavior, OSX build issue with Qt 5.4 and OSX quit behavior.
This commit is contained in:
		@@ -9,6 +9,8 @@ Window{
 | 
				
			|||||||
    width: 600
 | 
					    width: 600
 | 
				
			||||||
    height: 400
 | 
					    height: 400
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    modality: Qt.ApplicationModal
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ColumnLayout{
 | 
					    ColumnLayout{
 | 
				
			||||||
        anchors.fill: parent
 | 
					        anchors.fill: parent
 | 
				
			||||||
        anchors.margins: 15
 | 
					        anchors.margins: 15
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -114,6 +114,8 @@ Item{
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        function handleFontChange(fontSource, pixelSize, lineSpacing, screenScaling, fontWidth){
 | 
					        function handleFontChange(fontSource, pixelSize, lineSpacing, screenScaling, fontWidth){
 | 
				
			||||||
            fontLoader.source = fontSource;
 | 
					            fontLoader.source = fontSource;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            kterminal.antialiasText = appSettings.rasterization === appSettings.no_rasterization
 | 
				
			||||||
            font.pixelSize = pixelSize;
 | 
					            font.pixelSize = pixelSize;
 | 
				
			||||||
            font.family = fontLoader.name;
 | 
					            font.family = fontLoader.name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -141,6 +143,8 @@ Item{
 | 
				
			|||||||
            forceActiveFocus();
 | 
					            forceActiveFocus();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    Component {
 | 
				
			||||||
 | 
					        id: linuxContextMenu
 | 
				
			||||||
        Menu{
 | 
					        Menu{
 | 
				
			||||||
            id: contextmenu
 | 
					            id: contextmenu
 | 
				
			||||||
            MenuItem{action: copyAction}
 | 
					            MenuItem{action: copyAction}
 | 
				
			||||||
@@ -151,6 +155,24 @@ Item{
 | 
				
			|||||||
            MenuSeparator{visible: !appSettings.showMenubar}
 | 
					            MenuSeparator{visible: !appSettings.showMenubar}
 | 
				
			||||||
            CRTMainMenuBar{visible: !appSettings.showMenubar}
 | 
					            CRTMainMenuBar{visible: !appSettings.showMenubar}
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    Component {
 | 
				
			||||||
 | 
					        id: osxContextMenu
 | 
				
			||||||
 | 
					        Menu{
 | 
				
			||||||
 | 
					            id: contextmenu
 | 
				
			||||||
 | 
					            MenuItem{action: copyAction}
 | 
				
			||||||
 | 
					            MenuItem{action: pasteAction}
 | 
				
			||||||
 | 
					            MenuSeparator{visible: Qt.platform.os !== "osx"}
 | 
				
			||||||
 | 
					            MenuItem{action: fullscreenAction; visible: Qt.platform.os !== "osx"}
 | 
				
			||||||
 | 
					            MenuItem{action: showMenubarAction; visible: Qt.platform.os !== "osx"}
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    Loader {
 | 
				
			||||||
 | 
					        id: menuLoader
 | 
				
			||||||
 | 
					        sourceComponent: (Qt.platform.os === "osx" ? osxContextMenu : linuxContextMenu)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    property alias contextmenu: menuLoader.item
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    MouseArea{
 | 
					    MouseArea{
 | 
				
			||||||
        acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
 | 
					        acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
 | 
				
			||||||
        anchors.fill: parent
 | 
					        anchors.fill: parent
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -68,12 +68,16 @@ ApplicationWindow{
 | 
				
			|||||||
        id: quitAction
 | 
					        id: quitAction
 | 
				
			||||||
        text: qsTr("Quit")
 | 
					        text: qsTr("Quit")
 | 
				
			||||||
        shortcut: "Ctrl+Shift+Q"
 | 
					        shortcut: "Ctrl+Shift+Q"
 | 
				
			||||||
        onTriggered: terminalWindow.close();
 | 
					        onTriggered: Qt.quit();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    Action{
 | 
					    Action{
 | 
				
			||||||
        id: showsettingsAction
 | 
					        id: showsettingsAction
 | 
				
			||||||
        text: qsTr("Settings")
 | 
					        text: qsTr("Settings")
 | 
				
			||||||
        onTriggered: settingswindow.show();
 | 
					        onTriggered: {
 | 
				
			||||||
 | 
					            settingswindow.show();
 | 
				
			||||||
 | 
					            settingswindow.requestActivate();
 | 
				
			||||||
 | 
					            settingswindow.raise();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    Action{
 | 
					    Action{
 | 
				
			||||||
        id: copyAction
 | 
					        id: copyAction
 | 
				
			||||||
@@ -102,6 +106,8 @@ ApplicationWindow{
 | 
				
			|||||||
        text: qsTr("About")
 | 
					        text: qsTr("About")
 | 
				
			||||||
        onTriggered: {
 | 
					        onTriggered: {
 | 
				
			||||||
            aboutDialog.show();
 | 
					            aboutDialog.show();
 | 
				
			||||||
 | 
					            aboutDialog.requestActivate();
 | 
				
			||||||
 | 
					            aboutDialog.raise();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    ApplicationSettings{
 | 
					    ApplicationSettings{
 | 
				
			||||||
@@ -134,4 +140,10 @@ ApplicationWindow{
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    Component.onCompleted: appSettings.handleFontChanged();
 | 
					    Component.onCompleted: appSettings.handleFontChanged();
 | 
				
			||||||
 | 
					    onClosing: {
 | 
				
			||||||
 | 
					        // OSX Since we are currently supporting only one window
 | 
				
			||||||
 | 
					        // quit the application when it is closed.
 | 
				
			||||||
 | 
					        if (Qt.platform.os === "osx")
 | 
				
			||||||
 | 
					            Qt.quit()
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
 Submodule qmltermwidget updated: 71f2f3f9f0...b03e96edb5
									
								
							
		Reference in New Issue
	
	Block a user