aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/windows/impl/CheckIndicator.qml
blob: 818336dfdff1a996c10b599801d5197850972991 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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

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/Windows/images/checkmark.png"
        visible: indicator.control.checkState === Qt.Checked
                 || (indicator.control.checked && indicator.control.checkState === undefined)
    }
}