Move what is already there of 'package card' to it's own file.

part of CURA-8561
This commit is contained in:
Remco Burema 2021-11-05 09:26:27 +01:00
parent 51434eda1b
commit e93ecd3699
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
2 changed files with 30 additions and 17 deletions

View file

@ -0,0 +1,28 @@
// Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.15
import QtQuick.Controls 2.15
import UM 1.4 as UM
Rectangle
{
property var packageData
width: parent.width
height: UM.Theme.getSize("card").height
color: UM.Theme.getColor("main_background")
radius: UM.Theme.getSize("default_radius").width
Label
{
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: Math.round((parent.height - height) / 2)
text: packageData.displayName
font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
}
}