aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/quickcontrols/styles/styles.qml
blob: 62a39e4071229d2c3bc73606763b78c1778a178e (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick
import QtQuick.Layouts
import QtQuick.Controls

ApplicationWindow {
    id: window

    visible: true
    minimumWidth: column.implicitWidth + 80
    minimumHeight: column.implicitHeight + 80
    title: "Qt Quick Controls 2 - Styles"

    // for taking frameless screenshots:
    // flags: Qt.Window | Qt.FramelessWindowHint

    ColumnLayout {
        id: column

        spacing: 20
        anchors.fill: parent
        anchors.margins: 40

        GroupBox {
            title: "Font Size"
            topPadding: 30
            background.visible: false

            ColumnLayout {
                anchors.fill: parent
                anchors.leftMargin: 20

                RadioButton { leftPadding: 0; text: "Small" }
                RadioButton { leftPadding: 0; text: "Medium"; checked: true }
                RadioButton { leftPadding: 0; text: "Large" }
            }
        }

        GroupBox {
            title: "Audio"
            topPadding: 30
            background.visible: false

            GridLayout {
                columns: 2
                columnSpacing: 30
                anchors.fill: parent
                anchors.leftMargin: 20

                Label { text: "Volume" }
                Slider { value: 1.0 }
                Label { text: "Bass" }
                Slider { value: 0.75 }
                Label { text: "Treble" }
                Slider { value: 0.5 }
            }
        }

        Button {
            text: "Save"
            Layout.alignment: Qt.AlignRight
        }

        Item { Layout.fillHeight: true }
    }
}