aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quickcontrols/qquickcolor/data/tst_color.qml
blob: cdbb7c41aa08a8da4094866b33871007f7789b37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick
import QtTest
import QtQuick.Controls
import QtQuick.Controls.impl

TestCase {
    id: testCase
    name: "Color"

    function test_transparent() {
        compare(Color.transparent("red", 0.2), Qt.rgba(1, 0, 0, 0.2))
        compare(Color.transparent(Qt.rgba(0, 1, 0, 1), 0.2), Qt.rgba(0, 1, 0, 0.2))
        compare(Color.transparent("#0000ff", 0.2), Qt.rgba(0, 0, 1, 0.2))
    }
}