Added UI skeleton for BMS settings screen
This commit is contained in:
37
qml/Controls/CheckBox.qml
Normal file
37
qml/Controls/CheckBox.qml
Normal file
@@ -0,0 +1,37 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
import Utils 1.0
|
||||
|
||||
CheckBox {
|
||||
id: control
|
||||
implicitHeight: 25
|
||||
spacing: 15
|
||||
|
||||
indicator: Rectangle {
|
||||
implicitWidth: control.implicitHeight
|
||||
implicitHeight: control.implicitHeight
|
||||
x: control.leftPadding
|
||||
y: parent.height / 2 - height / 2
|
||||
radius: 5
|
||||
border.color: Palette.borderColor
|
||||
border.width: 1
|
||||
color: control.checked ? Palette.alternativeBackgroundColor : Palette.backgroundColor
|
||||
|
||||
Image {
|
||||
source: "qrc:/Icons/check-indicator.svg"
|
||||
anchors.centerIn: parent
|
||||
visible: control.checked
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
text: control.text
|
||||
font.pixelSize: 18
|
||||
font.weight: Font.ExtraBold
|
||||
color: Palette.textColor
|
||||
elide: Text.ElideRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
leftPadding: control.indicator.width + control.spacing
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user