Switch out the file, view and edit menu for controls 2

CURA-8683
This commit is contained in:
Jaime van Kessel 2022-01-10 16:55:28 +01:00
parent 58a3aef8d4
commit 052898ce21
9 changed files with 285 additions and 251 deletions

View file

@ -1,25 +1,24 @@
// Copyright (c) 2020 Ultimaker B.V.
// Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Controls 2.1
import UM 1.6 as UM
import Cura 1.0 as Cura
import "../Dialogs"
Menu
UM.Menu
{
id: openFilesMenu
title: catalog.i18nc("@title:menu menubar:file", "Open File(s)...")
iconName: "document-open-recent";
Instantiator
{
id: fileProviders
model: CuraApplication.getFileProviderModel()
MenuItem
UM.MenuItem
{
text:
{
@ -39,6 +38,7 @@ Menu
// Unassign the shortcuts when the submenu is invisible (i.e. when there is only one file provider) to avoid ambiguous shortcuts.
// When there is a single file provider, the openAction is assigned with the Ctrl+O shortcut instead.
shortcut: openFilesMenu.visible ? model.shortcut : ""
visible: openFilesMenu.visible
}
onObjectAdded: openFilesMenu.insertItem(index, object)
onObjectRemoved: openFilesMenu.removeItem(object)