mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Use the StatusIcon qml component for the warning icons
CURA-8349
This commit is contained in:
parent
d41d68e6fa
commit
83fe65b8eb
2 changed files with 9 additions and 47 deletions
|
@ -6,7 +6,7 @@ import QtQuick.Controls 2.1
|
|||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Controls 1.4 as Controls1
|
||||
|
||||
import UM 1.3 as UM
|
||||
import UM 1.4 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
|
||||
|
@ -63,38 +63,19 @@ Column
|
|||
width: parent.width
|
||||
visible: widget.backendState == UM.Backend.Error
|
||||
|
||||
height: icon.height
|
||||
Item
|
||||
height: warningIcon.height
|
||||
UM.StatusIcon
|
||||
{
|
||||
id: icon
|
||||
id: warningIcon
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: visible ? UM.Theme.getSize("section_icon").width : 0
|
||||
height: width
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: warningIconBackground
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
source: UM.Theme.getIcon("CircleSolid", "low")
|
||||
color: UM.Theme.getColor("warning")
|
||||
}
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: warningIcon
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
source: UM.Theme.getIcon("Warning", "low")
|
||||
color: UM.Theme.getColor("message_warning_icon")
|
||||
}
|
||||
status: UM.StatusIcon.Status.WARNING
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: label
|
||||
anchors.left: icon.right
|
||||
anchors.left: warningIcon.right
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.2 as UM
|
||||
import UM 1.4 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
Item
|
||||
|
@ -31,32 +31,13 @@ Item
|
|||
height: icon.height
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
Item
|
||||
UM.StatusIcon
|
||||
{
|
||||
id: icon
|
||||
width: visible ? UM.Theme.getSize("section_icon").width : 0
|
||||
height: width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: warningIconBackground
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
source: UM.Theme.getIcon("CircleSolid", "low")
|
||||
color: UM.Theme.getColor("warning")
|
||||
}
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: warningIcon
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
source: UM.Theme.getIcon("Warning", "low")
|
||||
color: UM.Theme.getColor("message_warning_icon")
|
||||
}
|
||||
status: UM.StatusIcon.Status.WARNING
|
||||
}
|
||||
Label
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue