Use Cura.Menu instead of UM.Menu

Same as the previous commit. Use the specialised variant provided by Cura instead
of the generic one of UM

CURA-8683
This commit is contained in:
Jaime van Kessel 2022-01-14 13:50:44 +01:00
parent 3130ea0f74
commit babf3043f8
6 changed files with 8 additions and 10 deletions

View file

@ -27,7 +27,7 @@ Menu
{ {
id: extensionsMenuSeparator id: extensionsMenuSeparator
MenuSeparator {} Cura.MenuSeparator {}
} }
Instantiator Instantiator
@ -35,7 +35,7 @@ Menu
id: extensions id: extensions
model: extensionModel model: extensionModel
UM.Menu Cura.Menu
{ {
id: sub_menu id: sub_menu
title: model.name title: model.name

View file

@ -7,7 +7,7 @@ import QtQuick.Controls 2.4
import UM 1.5 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
UM.Menu Cura.Menu
{ {
id: materialMenu id: materialMenu
title: catalog.i18nc("@label:category menu label", "Material") title: catalog.i18nc("@label:category menu label", "Material")

View file

@ -7,7 +7,7 @@ import QtQuick.Controls 2.4
import UM 1.5 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
UM.Menu Cura.Menu
{ {
id: nozzleMenu id: nozzleMenu
title: "Nozzle" title: "Nozzle"

View file

@ -9,7 +9,7 @@ import Cura 1.0 as Cura
import "../Dialogs" import "../Dialogs"
UM.Menu Cura.Menu
{ {
id: openFilesMenu id: openFilesMenu
title: catalog.i18nc("@title:menu menubar:file", "Open File(s)...") title: catalog.i18nc("@title:menu menubar:file", "Open File(s)...")

View file

@ -9,7 +9,7 @@ import Cura 1.1 as Cura
import "../Dialogs" import "../Dialogs"
UM.Menu Cura.Menu
{ {
id: saveProjectMenu id: saveProjectMenu
title: catalog.i18nc("@title:menu menubar:file", "Save Project...") title: catalog.i18nc("@title:menu menubar:file", "Save Project...")

View file

@ -2,20 +2,18 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.3
import UM 1.1 as UM import UM 1.5 as UM
// //
// Menu with Cura styling. // Menu with Cura styling.
// //
Menu UM.Menu
{ {
id: menu id: menu
padding: 0 padding: 0
implicitWidth: UM.Theme.getSize("setting_control").width implicitWidth: UM.Theme.getSize("setting_control").width
width: Math.max.apply(Math, Object.values(contentChildren).map(function(c) { return c.width }))
background: Rectangle { background: Rectangle {
color: UM.Theme.getColor("setting_control") color: UM.Theme.getColor("setting_control")