Newer
Older
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.2
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
Gus Grubba
committed
anchors.fill: parent
anchors.margins: ScreenTools.defaultFontPixelWidth
color: "white"
property var palette: QGCPalette { colorGroupEnabled: true }
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Component {
id: arbBox
Rectangle {
width: arbGrid.width * 1.5
height: arbGrid.height * 1.5
color: backgroundColor
border.color: qgcPal.text
border.width: 1
anchors.horizontalCenter: parent.horizontalCenter
GridLayout {
id: arbGrid
columns: 4
rowSpacing: 10
anchors.centerIn: parent
QGCColoredImage {
color: qgcPal.colorGreen
width: ScreenTools.defaultFontPixelWidth * 2
height: width
sourceSize.height: width
mipmap: true
fillMode: Image.PreserveAspectFit
source: "/qmlimages/Gears.svg"
}
Label { text: "colorGreen"; color: qgcPal.colorGreen; }
QGCColoredImage {
color: qgcPal.colorOrange
width: ScreenTools.defaultFontPixelWidth * 2
height: width
sourceSize.height: width
mipmap: true
fillMode: Image.PreserveAspectFit
source: "/qmlimages/Gears.svg"
}
Label { text: "colorOrange"; color: qgcPal.colorOrange; }
QGCColoredImage {
color: qgcPal.colorRed
width: ScreenTools.defaultFontPixelWidth * 2
height: width
sourceSize.height: width
mipmap: true
fillMode: Image.PreserveAspectFit
source: "/qmlimages/Gears.svg"
}
Label { text: "colorRed"; color: qgcPal.colorRed; }
QGCColoredImage {
color: qgcPal.colorGrey
width: ScreenTools.defaultFontPixelWidth * 2
height: width
sourceSize.height: width
mipmap: true
fillMode: Image.PreserveAspectFit
source: "/qmlimages/Gears.svg"
}
Label { text: "colorGrey"; color: qgcPal.colorGrey; }
QGCColoredImage {
color: qgcPal.colorBlue
width: ScreenTools.defaultFontPixelWidth * 2
height: width
sourceSize.height: width
mipmap: true
fillMode: Image.PreserveAspectFit
source: "/qmlimages/Gears.svg"
}
Label { text: "colorBlue"; color: qgcPal.colorBlue; }
}
}
}
Gus Grubba
committed
QGCFlickable {
anchors.fill: parent
contentWidth: _rootCol.width
contentHeight: _rootCol.height
clip: true
Gus Grubba
committed
Column {
id: _rootCol
Gus Grubba
committed
Rectangle {
width: parent.width
height: themeChoice.height * 2
color: palette.window
QGCLabel {
text: qsTr("Window Color")
anchors.left: parent.left
anchors.leftMargin: 20
}
Row {
id: themeChoice
anchors.centerIn: parent
anchors.margins: 20
spacing: 20
ExclusiveGroup { id: themeGroup }
QGCRadioButton {
text: qsTr("Light")
checked: palette.globalTheme === QGCPalette.Light
exclusiveGroup: themeGroup
onClicked: { palette.globalTheme = QGCPalette.Light }
}
QGCRadioButton {
text: qsTr("Dark")
checked: palette.globalTheme === QGCPalette.Dark
exclusiveGroup: themeGroup
onClicked: { palette.globalTheme = QGCPalette.Dark }
Gus Grubba
committed
Row {
spacing: 30
// Theme preview
Gus Grubba
committed
columns: 5
spacing: 5
Gus Grubba
committed
id: rowHeader
Gus Grubba
committed
width: 180
height: 20
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
color: "black"
text: parent.text
}
Gus Grubba
committed
sourceComponent: rowHeader
Gus Grubba
committed
width: 80
height: 20
color: "black"
horizontalAlignment: Text.AlignHCenter
Gus Grubba
committed
text: qsTr("Disabled")
Gus Grubba
committed
width: 80
height: 20
color: "black"
horizontalAlignment: Text.AlignHCenter
Gus Grubba
committed
text: qsTr("Enabled")
Gus Grubba
committed
Text {
width: 80
Gus Grubba
committed
color: "black"
horizontalAlignment: Text.AlignHCenter
text: qsTr("Value")
Gus Grubba
committed
Text {
width: 80
Gus Grubba
committed
color: "black"
horizontalAlignment: Text.AlignHCenter
text: qsTr("Value")
Gus Grubba
committed
// window
Gus Grubba
committed
sourceComponent: rowHeader
property string text: "window"
Gus Grubba
committed
ClickableColor {
property var palette: QGCPalette { colorGroupEnabled: false }
color: palette.window
onColorSelected: palette.window = color
Gus Grubba
committed
ClickableColor {
property var palette: QGCPalette { colorGroupEnabled: true }
color: palette.window
onColorSelected: palette.window = color
Gus Grubba
committed
Text {
width: 80
Gus Grubba
committed
color: "black"
horizontalAlignment: Text.AlignHCenter
property var palette: QGCPalette { colorGroupEnabled: false }
text: palette.window
Loading
Loading full blame...