mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-22 12:58:39 +00:00
Merge pull request #154 from Swordfish90/improveosx
Merge OSX specific issues.
This commit is contained in:
commit
d4ca781e90
@ -37,9 +37,10 @@ int main(int argc, char *argv[])
|
||||
engine.rootContext()->setContextProperty("workdir", getNamedArgument(args, "--workdir"));
|
||||
engine.rootContext()->setContextProperty("shellProgram", getNamedArgument(args, "--program"));
|
||||
|
||||
// Manage import paths
|
||||
// Manage import paths for Linux and OSX.
|
||||
QStringList importPathList = engine.importPathList();
|
||||
importPathList.prepend(QCoreApplication::applicationDirPath() + "/imports/");
|
||||
importPathList.prepend(QCoreApplication::applicationDirPath() + "/../PlugIns");
|
||||
engine.setImportPathList(importPathList);
|
||||
|
||||
engine.load(QUrl("qrc:/main.qml"));
|
||||
|
@ -14,15 +14,15 @@ MenuBar {
|
||||
visible: defaultMenuBar.visible
|
||||
MenuItem {action: copyAction}
|
||||
MenuItem {action: pasteAction}
|
||||
MenuSeparator{}
|
||||
MenuSeparator{visible: Qt.platform.os !== "osx"}
|
||||
MenuItem {action: showsettingsAction}
|
||||
}
|
||||
Menu{
|
||||
title: qsTr("View")
|
||||
visible: defaultMenuBar.visible
|
||||
MenuItem {action: fullscreenAction}
|
||||
MenuItem {action: showMenubarAction}
|
||||
MenuSeparator{}
|
||||
MenuItem {action: fullscreenAction; visible: fullscreenAction.enabled}
|
||||
MenuItem {action: showMenubarAction; visible: showMenubarAction.enabled}
|
||||
MenuSeparator{visible: showMenubarAction.enabled}
|
||||
MenuItem {action: zoomIn}
|
||||
MenuItem {action: zoomOut}
|
||||
}
|
||||
|
@ -152,9 +152,9 @@ Item{
|
||||
id: contextmenu
|
||||
MenuItem{action: copyAction}
|
||||
MenuItem{action: pasteAction}
|
||||
MenuSeparator{}
|
||||
MenuItem{action: fullscreenAction}
|
||||
MenuItem{action: showMenubarAction}
|
||||
MenuSeparator{visible: Qt.platform.os !== "osx"}
|
||||
MenuItem{action: fullscreenAction; visible: Qt.platform.os !== "osx"}
|
||||
MenuItem{action: showMenubarAction; visible: Qt.platform.os !== "osx"}
|
||||
MenuSeparator{visible: !shadersettings.showMenubar}
|
||||
CRTMainMenuBar{visible: !shadersettings.showMenubar}
|
||||
}
|
||||
|
@ -56,7 +56,6 @@ Tab{
|
||||
id: txtslider
|
||||
onValueChanged: shadersettings.window_scaling = value;
|
||||
value: shadersettings.window_scaling
|
||||
tickmarksEnabled: true
|
||||
stepSize: 0.25
|
||||
Component.onCompleted: minimumValue = 0.5 //Without this value gets set to 0.5
|
||||
}
|
||||
|
@ -37,7 +37,9 @@ ApplicationWindow{
|
||||
onFullscreenChanged: visibility = (fullscreen ? Window.FullScreen : Window.Windowed)
|
||||
|
||||
//Workaround: if menubar is assigned ugly margins are visible.
|
||||
menuBar: shadersettings.showMenubar ? defaultMenuBar : null
|
||||
menuBar: Qt.platform.os === "osx"
|
||||
? defaultMenuBar
|
||||
: shadersettings.showMenubar ? defaultMenuBar : null
|
||||
|
||||
color: "#00000000"
|
||||
title: qsTr("cool-retro-term")
|
||||
@ -45,6 +47,7 @@ ApplicationWindow{
|
||||
Action {
|
||||
id: showMenubarAction
|
||||
text: qsTr("Show Menubar")
|
||||
enabled: Qt.platform.os !== "osx"
|
||||
checkable: true
|
||||
checked: shadersettings.showMenubar
|
||||
onTriggered: shadersettings.showMenubar = !shadersettings.showMenubar
|
||||
@ -52,6 +55,7 @@ ApplicationWindow{
|
||||
Action {
|
||||
id: fullscreenAction
|
||||
text: qsTr("Fullscreen")
|
||||
enabled: Qt.platform.os !== "osx"
|
||||
shortcut: "Alt+F11"
|
||||
onTriggered: shadersettings.fullscreen = !shadersettings.fullscreen;
|
||||
checkable: true
|
||||
|
@ -307,6 +307,13 @@ void Session::run()
|
||||
QString argsTmp(_arguments.join(" ").trimmed());
|
||||
QStringList arguments;
|
||||
arguments << exec;
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
// Fix osx initial behavior with -i (interactive) and -l (login).
|
||||
arguments.append("-i");
|
||||
arguments.append("-l");
|
||||
#endif
|
||||
|
||||
if (argsTmp.length())
|
||||
arguments << _arguments;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user