aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/codemodel/importscheck/007_compositeQmlCopyAndCppAndQml/QtQuick/Controls/Styles/Desktop/ToolButtonStyle.qml
blob: d3e3ea3c183cf6bec32f84f59df2021a50d8724e (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
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Controls.Private 1.0

Style {
    property Component panel: StyleItem {
        id: styleitem

        anchors.fill: parent
        elementType: "toolbutton"
        on: control.checkable && control.checked
        sunken: control.pressed
        raised: !(control.checkable && control.checked) && control.hovered
        hover: control.hovered
        hasFocus: control.activeFocus
        hints: control.styleHints
        text: control.text

        properties: {
            "icon": control.__iconAction.__icon,
            "position": control.__position,
            "menu" : control.menu !== null
        }
    }
}