mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-30 07:44:22 +08:00
Simplify the QML of application switcher
CURA-8421
This commit is contained in:
parent
9bf5d85be1
commit
fd0804646a
@ -64,9 +64,7 @@ Item
|
|||||||
|
|
||||||
opacity: opened ? 1 : 0
|
opacity: opened ? 1 : 0
|
||||||
Behavior on opacity { NumberAnimation { duration: 100 } }
|
Behavior on opacity { NumberAnimation { duration: 100 } }
|
||||||
padding: 0
|
padding: UM.Theme.getSize("wide_margin").width
|
||||||
width: contentWidth + 2 * UM.Theme.getSize("wide_margin").width
|
|
||||||
height: contentHeight + 2 * UM.Theme.getSize("wide_margin").width
|
|
||||||
|
|
||||||
contentItem: Item
|
contentItem: Item
|
||||||
{
|
{
|
||||||
@ -74,93 +72,85 @@ Item
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||||
|
|
||||||
Column
|
Grid
|
||||||
{
|
{
|
||||||
id: contentsColumn
|
id: ultimakerPlatformLinksGrid
|
||||||
|
columns: 3
|
||||||
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
||||||
width: ultimakerPlatformLinksGrid.width
|
Repeater
|
||||||
|
|
||||||
Grid
|
|
||||||
{
|
{
|
||||||
id: ultimakerPlatformLinksGrid
|
model:
|
||||||
columns: 3
|
[
|
||||||
spacing: UM.Theme.getSize("default_margin").width
|
|
||||||
|
|
||||||
Repeater
|
|
||||||
{
|
|
||||||
model:
|
|
||||||
[
|
|
||||||
{
|
|
||||||
displayName: catalog.i18nc("@label:button", "My printers"),
|
|
||||||
thumbnail: UM.Theme.getIcon("PrinterTriple", "high"),
|
|
||||||
description: catalog.i18nc("@tooltip:button", "Manage your printers in the Digital Factory."),
|
|
||||||
link: "https://digitalfactory.ultimaker.com/app/printers?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory-printers"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayName: "Digital Library", //Not translated, since it's a brand name.
|
|
||||||
thumbnail: UM.Theme.getIcon("Library", "high"),
|
|
||||||
description: catalog.i18nc("@tooltip:button", "Manage your files in the Digital Library."),
|
|
||||||
link: "https://digitalfactory.ultimaker.com/app/library?utm_source=cura&utm_medium=software&utm_campaign=switcher-library"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayName: catalog.i18nc("@label:button", "Print jobs"),
|
|
||||||
thumbnail: UM.Theme.getIcon("FoodBeverages"),
|
|
||||||
description: catalog.i18nc("@tooltip:button", "Manage things that are being printed."),
|
|
||||||
link: "https://digitalfactory.ultimaker.com/app/print-jobs?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory- printjobs"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayName: "Ultimaker Marketplace", //Not translated, since it's a brand name.
|
|
||||||
thumbnail: UM.Theme.getIcon("Shop", "high"),
|
|
||||||
description: catalog.i18nc("@tooltip:button", "Extend Ultimaker Cura with new plug-ins and profiles."),
|
|
||||||
link: "https://marketplace.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-marketplace-materials"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayName: "Ultimaker Academy", //Not translated, since it's a brand name.
|
|
||||||
thumbnail: UM.Theme.getIcon("Knowledge"),
|
|
||||||
description: catalog.i18nc("@tooltip:button", "Become an expert in 3D printing."),
|
|
||||||
link: "https://academy.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-academy"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayName: catalog.i18nc("@label:button", "Ultimaker support"),
|
|
||||||
thumbnail: UM.Theme.getIcon("Help", "high"),
|
|
||||||
description: catalog.i18nc("@tooltip:button", "Get help with how to use Ultimaker Cura."),
|
|
||||||
link: "https://support.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-support"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayName: catalog.i18nc("@label:button", "Ask a question"),
|
|
||||||
thumbnail: UM.Theme.getIcon("Speak", "high"),
|
|
||||||
description: catalog.i18nc("@tooltip:button", "Consult the Ultimaker community."),
|
|
||||||
link: "https://community.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-community"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayName: catalog.i18nc("@label:button", "Report a bug"),
|
|
||||||
thumbnail: UM.Theme.getIcon("Bug", "high"),
|
|
||||||
description: catalog.i18nc("@tooltip:button", "Notify the developers that something is going wrong."),
|
|
||||||
link: "https://github.com/Ultimaker/Cura/issues/new/choose"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayName: "Ultimaker.com", //Not translated, since it's a URL.
|
|
||||||
thumbnail: UM.Theme.getIcon("Browser"),
|
|
||||||
description: catalog.i18nc("@tooltip:button", "Visit Ultimaker's website."),
|
|
||||||
link: "https://ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-umwebsite"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
delegate: ApplicationButton
|
|
||||||
{
|
{
|
||||||
displayName: modelData.displayName
|
displayName: catalog.i18nc("@label:button", "My printers"),
|
||||||
iconSource: modelData.thumbnail
|
thumbnail: UM.Theme.getIcon("PrinterTriple", "high"),
|
||||||
tooltipText: modelData.description
|
description: catalog.i18nc("@tooltip:button", "Manage your printers in the Digital Factory."),
|
||||||
isExternalLink: true
|
link: "https://digitalfactory.ultimaker.com/app/printers?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory-printers"
|
||||||
|
},
|
||||||
onClicked: Qt.openUrlExternally(modelData.link)
|
{
|
||||||
|
displayName: "Digital Library", //Not translated, since it's a brand name.
|
||||||
|
thumbnail: UM.Theme.getIcon("Library", "high"),
|
||||||
|
description: catalog.i18nc("@tooltip:button", "Manage your files in the Digital Library."),
|
||||||
|
link: "https://digitalfactory.ultimaker.com/app/library?utm_source=cura&utm_medium=software&utm_campaign=switcher-library"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: catalog.i18nc("@label:button", "Print jobs"),
|
||||||
|
thumbnail: UM.Theme.getIcon("FoodBeverages"),
|
||||||
|
description: catalog.i18nc("@tooltip:button", "Manage things that are being printed."),
|
||||||
|
link: "https://digitalfactory.ultimaker.com/app/print-jobs?utm_source=cura&utm_medium=software&utm_campaign=switcher-digital-factory- printjobs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: "Ultimaker Marketplace", //Not translated, since it's a brand name.
|
||||||
|
thumbnail: UM.Theme.getIcon("Shop", "high"),
|
||||||
|
description: catalog.i18nc("@tooltip:button", "Extend Ultimaker Cura with new plug-ins and profiles."),
|
||||||
|
link: "https://marketplace.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-marketplace-materials"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: "Ultimaker Academy", //Not translated, since it's a brand name.
|
||||||
|
thumbnail: UM.Theme.getIcon("Knowledge"),
|
||||||
|
description: catalog.i18nc("@tooltip:button", "Become an expert in 3D printing."),
|
||||||
|
link: "https://academy.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-academy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: catalog.i18nc("@label:button", "Ultimaker support"),
|
||||||
|
thumbnail: UM.Theme.getIcon("Help", "high"),
|
||||||
|
description: catalog.i18nc("@tooltip:button", "Get help with how to use Ultimaker Cura."),
|
||||||
|
link: "https://support.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-support"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: catalog.i18nc("@label:button", "Ask a question"),
|
||||||
|
thumbnail: UM.Theme.getIcon("Speak", "high"),
|
||||||
|
description: catalog.i18nc("@tooltip:button", "Consult the Ultimaker community."),
|
||||||
|
link: "https://community.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-community"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: catalog.i18nc("@label:button", "Report a bug"),
|
||||||
|
thumbnail: UM.Theme.getIcon("Bug", "high"),
|
||||||
|
description: catalog.i18nc("@tooltip:button", "Notify the developers that something is going wrong."),
|
||||||
|
link: "https://github.com/Ultimaker/Cura/issues/new/choose"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: "Ultimaker.com", //Not translated, since it's a URL.
|
||||||
|
thumbnail: UM.Theme.getIcon("Browser"),
|
||||||
|
description: catalog.i18nc("@tooltip:button", "Visit Ultimaker's website."),
|
||||||
|
link: "https://ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-umwebsite"
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
delegate: ApplicationButton
|
||||||
|
{
|
||||||
|
displayName: modelData.displayName
|
||||||
|
iconSource: modelData.thumbnail
|
||||||
|
tooltipText: modelData.description
|
||||||
|
isExternalLink: true
|
||||||
|
|
||||||
|
onClicked: Qt.openUrlExternally(modelData.link)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
background: UM.PointingRectangle
|
background: UM.PointingRectangle
|
||||||
|
Loading…
x
Reference in New Issue
Block a user