2021-05-27 17:06:50 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2021-06-03 14:15:14 +00:00
|
|
|
Item {
|
|
|
|
id: themeSwitchWrapper
|
2021-05-27 17:06:50 +00:00
|
|
|
signal checkedChanged()
|
|
|
|
|
2021-06-03 14:15:14 +00:00
|
|
|
width: themeSwitch.width
|
|
|
|
height: themeSwitch.height
|
2021-05-27 17:06:50 +00:00
|
|
|
|
2021-06-03 14:15:14 +00:00
|
|
|
MouseArea {
|
|
|
|
id: sensor
|
|
|
|
hoverEnabled: true
|
|
|
|
anchors.fill: parent
|
2021-05-27 17:06:50 +00:00
|
|
|
|
2021-06-03 14:15:14 +00:00
|
|
|
Row {
|
|
|
|
id: themeSwitch
|
|
|
|
spacing: 2
|
|
|
|
|
|
|
|
Text {
|
|
|
|
text: "🌤"
|
|
|
|
font.pixelSize: 15
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
}
|
2021-05-27 17:06:50 +00:00
|
|
|
|
2021-06-03 14:15:14 +00:00
|
|
|
StatusSwitch {
|
|
|
|
onCheckedChanged: themeSwitchWrapper.checkedChanged()
|
|
|
|
|
|
|
|
StatusToolTip {
|
|
|
|
text: "Toggle Theme"
|
|
|
|
visible: sensor.containsMouse
|
|
|
|
orientation: StatusToolTip.Orientation.Bottom
|
|
|
|
y: themeSwitchWrapper.y + 16
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Text {
|
|
|
|
text: "🌙"
|
|
|
|
font.pixelSize: 15
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
}
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
|
|
|
}
|