mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-31 07:04:20 +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 | ||||
|     height: 400 | ||||
|  | ||||
|     modality: Qt.ApplicationModal | ||||
|  | ||||
|     ColumnLayout{ | ||||
|         anchors.fill: parent | ||||
|         anchors.margins: 15 | ||||
|   | ||||
| @@ -114,6 +114,8 @@ Item{ | ||||
|  | ||||
|         function handleFontChange(fontSource, pixelSize, lineSpacing, screenScaling, fontWidth){ | ||||
|             fontLoader.source = fontSource; | ||||
|  | ||||
|             kterminal.antialiasText = appSettings.rasterization === appSettings.no_rasterization | ||||
|             font.pixelSize = pixelSize; | ||||
|             font.family = fontLoader.name; | ||||
|  | ||||
| @@ -141,16 +143,36 @@ Item{ | ||||
|             forceActiveFocus(); | ||||
|         } | ||||
|     } | ||||
|     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"} | ||||
|         MenuSeparator{visible: !appSettings.showMenubar} | ||||
|         CRTMainMenuBar{visible: !appSettings.showMenubar} | ||||
|     Component { | ||||
|         id: linuxContextMenu | ||||
|         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"} | ||||
|             MenuSeparator{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{ | ||||
|         acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton | ||||
|         anchors.fill: parent | ||||
|   | ||||
| @@ -68,12 +68,16 @@ ApplicationWindow{ | ||||
|         id: quitAction | ||||
|         text: qsTr("Quit") | ||||
|         shortcut: "Ctrl+Shift+Q" | ||||
|         onTriggered: terminalWindow.close(); | ||||
|         onTriggered: Qt.quit(); | ||||
|     } | ||||
|     Action{ | ||||
|         id: showsettingsAction | ||||
|         text: qsTr("Settings") | ||||
|         onTriggered: settingswindow.show(); | ||||
|         onTriggered: { | ||||
|             settingswindow.show(); | ||||
|             settingswindow.requestActivate(); | ||||
|             settingswindow.raise(); | ||||
|         } | ||||
|     } | ||||
|     Action{ | ||||
|         id: copyAction | ||||
| @@ -102,6 +106,8 @@ ApplicationWindow{ | ||||
|         text: qsTr("About") | ||||
|         onTriggered: { | ||||
|             aboutDialog.show(); | ||||
|             aboutDialog.requestActivate(); | ||||
|             aboutDialog.raise(); | ||||
|         } | ||||
|     } | ||||
|     ApplicationSettings{ | ||||
| @@ -134,4 +140,10 @@ ApplicationWindow{ | ||||
|         } | ||||
|     } | ||||
|     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