Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasper Lamboo <c.lamboo@ultimaker.com>2022-05-11 18:30:55 +0300
committerGitHub <noreply@github.com>2022-05-11 18:30:55 +0300
commitb4ccd690ea28dd7786d1d3c0fac1b70e994dde2a (patch)
treeaff99864c593ab5c5b6fb626e5d04bb6141fc56e /resources
parente541eedde9a7387668fcc9d43efd3034ac2c31ae (diff)
parentf0d3686ee7dc9dac9fad6bb6786587efdf21b752 (diff)
Merge pull request #12161 from Ultimaker/CURA-9106_color_image_weird_scaling
[CURA-9106] Make parent item of ExtruderIcons handle all scaling.
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml9
-rw-r--r--resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml7
2 files changed, 12 insertions, 4 deletions
diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml
index 8d4fc9c2b5..76d33c9c77 100644
--- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml
+++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml
@@ -36,6 +36,8 @@ Cura.ExpandablePopup
headerItem: Item
{
+ id: headerBase
+
// Horizontal list that shows the extruders and their materials
RowLayout
{
@@ -51,9 +53,12 @@ Cura.ExpandablePopup
{
id: extruderItem
- Layout.preferredWidth: Math.round(parent.width / extrudersModel.count)
- Layout.maximumWidth: Math.round(parent.width / extrudersModel.count)
+ Layout.preferredWidth: Math.floor(headerBase.width / extrudersModel.count)
+ Layout.maximumWidth: Math.floor(headerBase.width / extrudersModel.count)
+ Layout.preferredHeight: headerBase.height
+ Layout.maximumHeight: headerBase.height
Layout.fillHeight: true
+ Layout.alignment: Qt.AlignCenter
property var extruderStack: activeMachine ? activeMachine.extruderList[model.index]: null
property bool valueWarning: !Cura.ExtruderManager.getExtruderHasQualityForMaterial(extruderStack)
diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
index 7223706e63..c24c031e83 100644
--- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
+++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
@@ -97,13 +97,16 @@ Item
checked: model.index == 0
contentItem: Item
{
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ width: Math.floor(tabBar.height / extrudersModel.count)
+ height: tabBar.height
Cura.ExtruderIcon
{
anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
materialColor: model.color
extruderEnabled: model.enabled
- width: parent.height
- height: parent.height
}
}
onClicked: