aboutsummaryrefslogtreecommitdiffstats
path: root/examples/demos/colorpaletteclient/QtExampleStyle/TextField.qml
blob: 7db2d4f988739f6a1ba288c1f5504f24199b8fc1 (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) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick
import QtQuick.Templates as T

T.TextField {
    id: control
    placeholderText: ""

    implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding)
    implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
                             contentHeight + topPadding + bottomPadding)

    background: Rectangle {
        implicitWidth: 200
        implicitHeight: 40
        radius: 8
        color: control.enabled ? "transparent" : "#353637"
        border.color: "#E0E2E7"
    }
}