mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-26 16:13:55 -06:00
Merge pull request #12161 from Ultimaker/CURA-9106_color_image_weird_scaling
[CURA-9106] Make parent item of ExtruderIcons handle all scaling.
This commit is contained in:
commit
b4ccd690ea
2 changed files with 12 additions and 4 deletions
|
@ -36,6 +36,8 @@ Cura.ExpandablePopup
|
||||||
|
|
||||||
headerItem: Item
|
headerItem: Item
|
||||||
{
|
{
|
||||||
|
id: headerBase
|
||||||
|
|
||||||
// Horizontal list that shows the extruders and their materials
|
// Horizontal list that shows the extruders and their materials
|
||||||
RowLayout
|
RowLayout
|
||||||
{
|
{
|
||||||
|
@ -51,9 +53,12 @@ Cura.ExpandablePopup
|
||||||
{
|
{
|
||||||
id: extruderItem
|
id: extruderItem
|
||||||
|
|
||||||
Layout.preferredWidth: Math.round(parent.width / extrudersModel.count)
|
Layout.preferredWidth: Math.floor(headerBase.width / extrudersModel.count)
|
||||||
Layout.maximumWidth: Math.round(parent.width / extrudersModel.count)
|
Layout.maximumWidth: Math.floor(headerBase.width / extrudersModel.count)
|
||||||
|
Layout.preferredHeight: headerBase.height
|
||||||
|
Layout.maximumHeight: headerBase.height
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
|
||||||
property var extruderStack: activeMachine ? activeMachine.extruderList[model.index]: null
|
property var extruderStack: activeMachine ? activeMachine.extruderList[model.index]: null
|
||||||
property bool valueWarning: !Cura.ExtruderManager.getExtruderHasQualityForMaterial(extruderStack)
|
property bool valueWarning: !Cura.ExtruderManager.getExtruderHasQualityForMaterial(extruderStack)
|
||||||
|
|
|
@ -97,13 +97,16 @@ Item
|
||||||
checked: model.index == 0
|
checked: model.index == 0
|
||||||
contentItem: Item
|
contentItem: Item
|
||||||
{
|
{
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
width: Math.floor(tabBar.height / extrudersModel.count)
|
||||||
|
height: tabBar.height
|
||||||
Cura.ExtruderIcon
|
Cura.ExtruderIcon
|
||||||
{
|
{
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
materialColor: model.color
|
materialColor: model.color
|
||||||
extruderEnabled: model.enabled
|
extruderEnabled: model.enabled
|
||||||
width: parent.height
|
|
||||||
height: parent.height
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked:
|
onClicked:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue