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

VerifiedIcon.qml « qml « resources « Marketplace « plugins - github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6b9d7b6017fb76e3990167d6b07f85b5bc262a6e (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
// 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
Control
{
    implicitWidth: UM.Theme.getSize("card_tiny_icon").width
    implicitHeight: UM.Theme.getSize("card_tiny_icon").height

    UM.ToolTip
    {
        tooltipText:
        {
            switch(packageData.packageType)
            {
                case "plugin": return catalog.i18nc("@info", "Ultimaker Verified Plug-in");
                case "material": return catalog.i18nc("@info", "Ultimaker Certified Material");
                default: return catalog.i18nc("@info", "Ultimaker Verified Package");
            }
        }
        visible: parent.hovered
        targetPoint: Qt.point(0, Math.round(parent.y + parent.height / 4))
    }

    Rectangle
    {
        anchors.fill: parent
        color: UM.Theme.getColor("action_button_hovered")
        radius: width
        UM.RecolorImage
        {
            anchors.fill: parent
            color: UM.Theme.getColor("primary")
            source: packageData.packageType == "plugin" ? UM.Theme.getIcon("CheckCircle") : UM.Theme.getIcon("Certified")
        }
    }

    //NOTE: Can we link to something here? (Probably a static link explaining what verified is):
    // onClicked: Qt.openUrlExternally( XXXXXX )
}