mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-21 04:19:00 +00:00
Fix: fix OSX context menu issues. Split the context menus into two different components.
This commit is contained in:
parent
56d366116a
commit
6c1c17445a
@ -141,16 +141,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user