Implement info icon with UM.StatusIcon

This way the sizes are consistent with the other similar icons in the UI.

Contributes to issue CURA-8609.
This commit is contained in:
Ghostkeeper 2021-10-11 13:49:45 +02:00
parent da76280359
commit 43bcd2b56a
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -7,7 +7,7 @@ import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.15
import QtQuick.Window 2.1
import Cura 1.1 as Cura
import UM 1.2 as UM
import UM 1.4 as UM
Window
{
@ -284,22 +284,14 @@ Window
}
spacing: UM.Theme.getSize("default_margin").width
Rectangle //Info icon with a themeable color and background.
UM.StatusIcon
{
id: infoIcon
width: UM.Theme.getSize("machine_selector_icon").width
width: UM.Theme.getSize("section_icon").width
height: width
Layout.preferredWidth: width
Layout.alignment: Qt.AlignVCenter
radius: height / 2
color: UM.Theme.getColor("warning")
UM.RecolorImage
{
source: UM.Theme.getIcon("EmptyInfo")
anchors.fill: parent
color: UM.Theme.getColor("machine_selector_printer_icon")
}
status: UM.StatusIcon.Status.WARNING
}
Label