aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/codemodel/importscheck/007_compositeQmlCopyAndCppAndQml/QtQuick/Controls/Styles/Base/MenuBarStyle.qml
blob: 7904f0f654ec7e0bae1254f3f18ba23918776c70 (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
29
30
31
32
33
34
35
36
37
38
39
// 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

/*!
    \qmltype MenuBarStyle
    \internal
    \ingroup applicationwindowstyling
    \inqmlmodule QtQuick.Controls.Styles
*/

Style {
    readonly property color __backgroundColor: "#dcdcdc"

    property Component frame: Rectangle {
        width: control.__contentItem.width
        height: contentHeight
        color: __backgroundColor
    }

    property Component menuItem: Rectangle {
        width: text.width + 12
        height: text.height + 4
        color: sunken ? "#49d" :__backgroundColor

        SystemPalette { id: syspal }

        Text {
            id: text
            text: StyleHelpers.stylizeMnemonics(menuItem.title)
            anchors.centerIn: parent
            renderType: Text.NativeRendering
            color: sunken ? "white" : syspal.windowText
        }
    }
}