Apply suggestions from code review

Co-authored-by: Jelle Spijker <j.spijker@ultimaker.com>
This commit is contained in:
Joey de l'Arago 2022-12-05 14:42:35 +01:00 committed by GitHub
parent 741a112282
commit ce5691c12d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 28 additions and 15 deletions

View file

@ -68,7 +68,10 @@ Item
}
visible: currentModeIndex == PrintSetupSelectorContents.Mode.Recommended
function onModeChanged() { currentModeIndex = PrintSetupSelectorContents.Mode.Custom }
function onModeChanged()
{
currentModeIndex = PrintSetupSelectorContents.Mode.Custom;
}
}
CustomPrintSetup
@ -125,7 +128,8 @@ Item
{
id: buttonRow
property real padding: UM.Theme.getSize("default_margin").width
height: {
height:
{
if (currentModeIndex == PrintSetupSelectorContents.Mode.Custom)
{
return recommendedButton.height + 2 * padding + (draggableArea.visible ? draggableArea.height : 0)

View file

@ -1,4 +1,4 @@
// Copyright (c) 2022 UltiMaker B.V.
// Copyright (c) 2022 UltiMaker
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7

View file

@ -1,4 +1,4 @@
//Copyright (c) 2022 UltiMaker B.V.
// Copyright (c) 2022 UltiMaker
//Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10

View file

@ -1,4 +1,4 @@
// Copyright (c) 2022 UltiMaker B.V.
// Copyright (c) 2022 UltiMaker
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10

View file

@ -1,4 +1,4 @@
// Copyright (c) 2022 UltiMaker B.V.
// Copyright (c) 2022 UltiMaker
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10
@ -17,7 +17,7 @@ Item
property alias enableSectionSwitchVisible: enableSectionSwitch.visible
property alias enableSectionSwitchChecked: enableSectionSwitch.checked
property alias enableSectionSwitchEnabled: enableSectionSwitch.enabled
property string tooltipText: "test"
property string tooltipText: ""
property var enableSectionClicked: { return }
property int leftColumnWidth: Math.floor(width * 0.35)
property bool isCompressed: false

View file

@ -1,4 +1,4 @@
// Copyright (c) 2022 Ultimaker B.V.
// Copyright (c) 2022 Ultimaker
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7

View file

@ -20,7 +20,8 @@ RecommendedSettingSection
enableSectionSwitchEnabled: recommendedPrintSetup.settingsEnabled
tooltipText: catalog.i18nc("@label", "Generate structures to support parts of the model which have overhangs. Without these structures, such parts would collapse during printing.")
function onEnableSectionChanged(state) {
function onEnableSectionChanged(state)
{
supportEnabled.setPropertyValue("value", state)
}

View file

@ -1,5 +1,6 @@
// Copyright (c) 2022 UltiMaker B.V.
// Copyright (c) 2022 UltiMaker
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.15
RegularExpressionValidator

View file

@ -1,5 +1,6 @@
// Copyright (c) 2022 UltiMaker B.V.
// Copyright (c) 2022 UltiMaker
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.15
RegularExpressionValidator

View file

@ -1,5 +1,6 @@
// Copyright (c) 2022 UltiMaker B.V.
// Copyright (c) 2022 UltiMaker
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.15
RegularExpressionValidator

View file

@ -1,5 +1,6 @@
// Copyright (c) 2022 UltiMaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.15
RegularExpressionValidator

View file

@ -1,4 +1,4 @@
// Copyright (c) 2022 UltiMaker B.V.
// Copyright (c) 2022 UltiMaker
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10

View file

@ -1,3 +1,6 @@
// Copyright (c) 2022 UltiMaker
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.3

View file

@ -104,7 +104,8 @@ RowLayout
}
// Override this function to update a setting differently
function updateSetting(value) {
function updateSetting(value)
{
if (updateAllExtruders)
{
Cura.MachineManager.setSettingForAllExtruders(propertyProvider.key, "value", value)

View file

@ -1,4 +1,4 @@
// Copyright (c) 2022 UltiMaker B.V.
// Copyright (c) 2022 UltiMaker
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10