mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-23 22:29:41 +08:00

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 bb20e3307f43edc1ff53cb154d2351ddfe39e158. Revert "Revert "Merge pull request #9716 from Ultimaker/CURA-8010_new_icons"" This reverts commit 70e4e9640e561e18a12870f30c905203ce8ccee7. Revert "Revert "Fix typo in icon name"" This reverts commit 38ce22ba7c3f40b971bc6e1e0a8e776ca9d51512. Revert "Revert "Add list for deprecated icons"" This reverts commit 119a957e7f978dbf1ddbcb3b0005bf38e8fed943. Revert "Revert "Add Function icon"" This reverts commit 760726cf0bb953bb1b0fc277b448f419d4bd2544. Revert "Revert "Switch out inherit icon"" This reverts commit 26afff609381e2004d194c280f504b6226859bd3. Revert "Revert "Merge branch 'CURA-8205_Introduce_new_icons_in_Cura' of github.com:Ultimaker/Cura"" This reverts commit 6483db3d47ee052c1a966cdee3af7190577a5769. Revert "Fix incorrect icons" This reverts commit 02a4ade2a50a943ff36fd4895bdc9261cf2133eb.
76 lines
2.4 KiB
QML
76 lines
2.4 KiB
QML
// Copyright (c) 2019 Ultimaker B.V.
|
|
// Cura is released under the terms of the LGPLv3 or higher.
|
|
|
|
import QtQuick 2.2
|
|
import QtQuick.Controls 2.0
|
|
import UM 1.3 as UM
|
|
|
|
/**
|
|
* This component comprises a buildplate icon and the buildplate name. It is
|
|
* used by the MonitorPrinterConfiguration component along with two instances
|
|
* of MonitorExtruderConfiguration.
|
|
*
|
|
* NOTE: For most labels, a fixed height with vertical alignment is used to make
|
|
* layouts more deterministic (like the fixed-size textboxes used in original
|
|
* mock-ups). This is also a stand-in for CSS's 'line-height' property. Denoted
|
|
* with '// FIXED-LINE-HEIGHT:'.
|
|
*/
|
|
Item
|
|
{
|
|
// The buildplate name
|
|
property var buildplate: null
|
|
|
|
// Height is one 18px label/icon
|
|
height: 18 * screenScaleFactor // TODO: Theme!
|
|
width: childrenRect.width
|
|
|
|
Row
|
|
{
|
|
height: parent.height
|
|
spacing: UM.Theme.getSize("print_setup_slider_handle").width // TODO: Theme! (Should be same as extruder spacing)
|
|
|
|
// This wrapper ensures that the buildplate icon is located centered
|
|
// below an extruder icon.
|
|
Item
|
|
{
|
|
height: parent.height
|
|
width: 32 * screenScaleFactor // Ensure the icon is centered under the extruder icon (same width)
|
|
|
|
Rectangle
|
|
{
|
|
anchors.centerIn: parent
|
|
height: parent.height
|
|
width: height
|
|
color: buildplateIcon.visible > 0 ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading")
|
|
radius: Math.floor(height / 2)
|
|
}
|
|
|
|
UM.RecolorImage
|
|
{
|
|
id: buildplateIcon
|
|
anchors.centerIn: parent
|
|
color: UM.Theme.getColor("monitor_icon_primary")
|
|
height: parent.height
|
|
source: "../svg/icons/Buildplate.svg"
|
|
width: height
|
|
visible: buildplate
|
|
}
|
|
}
|
|
|
|
Label
|
|
{
|
|
id: buildplateLabel
|
|
color: UM.Theme.getColor("text")
|
|
elide: Text.ElideRight
|
|
font: UM.Theme.getFont("default") // 12pt, regular
|
|
text: buildplate ? buildplate : ""
|
|
visible: text !== ""
|
|
|
|
// FIXED-LINE-HEIGHT:
|
|
height: 18 * screenScaleFactor // TODO: Theme!
|
|
verticalAlignment: Text.AlignVCenter
|
|
renderType: Text.NativeRendering
|
|
}
|
|
}
|
|
}
|