Added new intent selection buttons and resolution drop down to replace the matrix.

We are now selecting intents first and then quality, however the container hierarchy quality -> intents. This is the reason for the new functions inside machine manager.

CURA-8849
This commit is contained in:
j.delarago 2022-06-14 11:41:38 +02:00
parent 6f88adab8e
commit a87695cd8d
9 changed files with 454 additions and 178 deletions

View file

@ -0,0 +1,63 @@
// Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10
import QtQuick.Controls 2.3
import QtQuick.Layouts 2.10
import UM 1.5 as UM
import Cura 1.7 as Cura
Rectangle
{
id: base
height: 60
Layout.fillWidth: true
color: mouseArea.containsMouse || selected ? UM.Theme.getColor("um_blue_1") : UM.Theme.getColor("background_1")
property alias iconSource: intentIcon.source
property alias text: qualityLabel.text
property bool selected: false
signal clicked()
MouseArea
{
id: mouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: base.clicked()
}
Item
{
width: intentIcon.width
anchors
{
top: parent.top
bottom: qualityLabel.top
horizontalCenter: parent.horizontalCenter
}
UM.ColorImage
{
id: intentIcon
width: UM.Theme.getSize("recommended_button_icon").width
height: width
anchors.centerIn: parent
color: UM.Theme.getColor("icon")
}
}
UM.Label
{
id: qualityLabel
anchors
{
bottom: parent.bottom
horizontalCenter: parent.horizontalCenter
bottomMargin: UM.Theme.getSize("narrow_margin").height
}
}
}