mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 15:15:56 +08:00
Change another useless rectangle into an item
It's more efficient to render. Also changed some code style. Contributes to issue CURA-6032.
This commit is contained in:
parent
c66257bf4d
commit
c0c45519a0
@ -1,5 +1,5 @@
|
|||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2018 Ultimaker B.V.
|
||||||
// Uranium is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
@ -70,7 +70,8 @@ Rectangle
|
|||||||
}
|
}
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
if (materialSlot.is_favorite) {
|
if (materialSlot.is_favorite)
|
||||||
|
{
|
||||||
base.materialManager.removeFavorite(material.root_material_id)
|
base.materialManager.removeFavorite(material.root_material_id)
|
||||||
materialSlot.is_favorite = false
|
materialSlot.is_favorite = false
|
||||||
return
|
return
|
||||||
@ -81,13 +82,10 @@ Rectangle
|
|||||||
}
|
}
|
||||||
style: ButtonStyle
|
style: ButtonStyle
|
||||||
{
|
{
|
||||||
background: Rectangle
|
background: Item { }
|
||||||
|
}
|
||||||
|
UM.RecolorImage
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
|
||||||
color: "transparent"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
UM.RecolorImage {
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
verticalCenter: favorite_button.verticalCenter
|
verticalCenter: favorite_button.verticalCenter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user