aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/macos/impl/CheckIndicator.qml
blob: ecb2614499c4eeb84ff687483cf436006b3554c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// Qt-Security score:significant reason:default

import QtQuick
import QtQuick.Controls.impl

Item {
    id: indicator
    implicitWidth: 14
    implicitHeight: 10

    property Item control

    ColorImage {
        y: (parent.height - height) / 2
        color: control.palette.text
        source: "qrc:/qt-project.org/imports/QtQuick/Controls/macOS/images/checkmark.png"
        visible: indicator.control.checkState === Qt.Checked
                 || (indicator.control.checked && indicator.control.checkState === undefined)
    }
}