Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PackageCard.qml « qml « resources « Marketplace « plugins - github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7442c63aa625fb19d8b5762e646313f918fdd0be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// 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 QtQuick.Layouts 1.1

import UM 1.6 as UM
import Cura 1.6 as Cura

Rectangle
{
    property alias packageData: packageCardHeader.packageData
    property alias showUpdateButton:  packageCardHeader.showUpdateButton
    property alias showDisableButton:  packageCardHeader.showDisableButton
    property alias showInstallButton: packageCardHeader.showInstallButton

    height: childrenRect.height
    color: UM.Theme.getColor("main_background")
    radius: UM.Theme.getSize("default_radius").width

    PackageCardHeader
    {
        id: packageCardHeader

        Item
        {
            id: shortDescription

            anchors.fill: parent

            Label
            {
                id: descriptionLabel
                width: parent.width

                text: packageData.description
                font: UM.Theme.getFont("default")
                color: UM.Theme.getColor("text")
                maximumLineCount: 2
                wrapMode: Text.Wrap
                elide: Text.ElideRight
                visible: text !== ""
            }
        }
    }

    FontMetrics
    {
        id: fontMetrics
        font: UM.Theme.getFont("default")
    }
}