Cura/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml
Ghostkeeper 0a75c772ed
Unrevert new icon set for all of Cura's interface
We created a new set of icons for Cura. These icons had to be reverted though because they weren't working out in the interface for the last release yet.
This unreverts them, basically adding them back hoping that we'll get them fixed in time for the next release.

Contributes to issue CURA-8342.

Revert "Revert "Fix merge conflict""

This reverts commit bb20e3307f.

Revert "Revert "Merge pull request #9716 from Ultimaker/CURA-8010_new_icons""

This reverts commit 70e4e9640e.

Revert "Revert "Fix typo in icon name""

This reverts commit 38ce22ba7c.

Revert "Revert "Add list for deprecated icons""

This reverts commit 119a957e7f.

Revert "Revert "Add Function icon""

This reverts commit 760726cf0b.

Revert "Revert "Switch out inherit icon""

This reverts commit 26afff6093.

Revert "Revert "Merge branch 'CURA-8205_Introduce_new_icons_in_Cura' of github.com:Ultimaker/Cura""

This reverts commit 6483db3d47.

Revert "Fix incorrect icons"

This reverts commit 02a4ade2a5.
2021-06-28 17:16:56 +02:00

90 lines
2.6 KiB
QML

// Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import UM 1.2 as UM
import Cura 1.0 as Cura
//
// Adhesion
//
Item
{
id: enableAdhesionRow
height: childrenRect.height
property real labelColumnWidth: Math.round(width / 3)
property var curaRecommendedMode: Cura.RecommendedMode {}
Cura.IconWithText
{
id: enableAdhesionRowTitle
anchors.top: parent.top
anchors.left: parent.left
source: UM.Theme.getIcon("Adhesion")
text: catalog.i18nc("@label", "Adhesion")
font: UM.Theme.getFont("medium")
width: labelColumnWidth
}
Item
{
id: enableAdhesionContainer
height: enableAdhesionCheckBox.height
anchors
{
left: enableAdhesionRowTitle.right
right: parent.right
verticalCenter: enableAdhesionRowTitle.verticalCenter
}
CheckBox
{
id: enableAdhesionCheckBox
anchors.verticalCenter: parent.verticalCenter
property alias _hovered: adhesionMouseArea.containsMouse
//: Setting enable printing build-plate adhesion helper checkbox
style: UM.Theme.styles.checkbox
enabled: recommendedPrintSetup.settingsEnabled
visible: platformAdhesionType.properties.enabled == "True"
checked: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none"
MouseArea
{
id: adhesionMouseArea
anchors.fill: parent
hoverEnabled: true
onClicked:
{
curaRecommendedMode.setAdhesion(!parent.checked)
}
onEntered:
{
base.showTooltip(enableAdhesionCheckBox, Qt.point(-enableAdhesionContainer.x - UM.Theme.getSize("thick_margin").width, 0),
catalog.i18nc("@label", "Enable printing a brim or raft. This will add a flat area around or under your object which is easy to cut off afterwards."));
}
onExited: base.hideTooltip()
}
}
}
UM.SettingPropertyProvider
{
id: platformAdhesionType
containerStack: Cura.MachineManager.activeMachine
removeUnusedValue: false //Doesn't work with settings that are resolved.
key: "adhesion_type"
watchedProperties: [ "value", "resolve", "enabled" ]
storeIndex: 0
}
}