Skip to content

Relay colour button change on operation for comformity of switching #277

@RobDuthie

Description

@RobDuthie

File name: TileRelay.qml

Changed these colours to make as per standard switch orietation for safety and much easier to see what postion it is in etc.
Red means on danger
Green means off safe
This is for Dark and Light mode, tested OK and looks good and is more meaningfull.
Also changed the auto mode colours as well to show warning in the same format.

////// GuiMods - DarkMode
baseColor: !darkMode ? (onButtonActive ? "red" : "grey") : (onButtonActive ? "red" : "grey")
pressedColor: "#979797"
height: 40
width: parent.width - 6
anchors.horizontalCenter: parent.horizontalCenter
onClicked: buttonPress (1)
content: TileText
{
text: onButtonText; font.bold: true;
color: onButtonActive ? "white" : "black"
}
}
Button
{
id: offButton
////// GuiMods - DarkMode
baseColor: !darkMode ? (offButtonActive ? "green" : "grey") : (offButtonActive ? "green" : "grey")
pressedColor: "#979797"
height: 40
width: parent.width - 6
anchors.horizontalCenter: parent.horizontalCenter
onClicked: buttonPress (2)
content: TileText
{
text: offButtonText; font.bold: true;
color: offButtonActive ? "white" : "black"
}
}
Button
{
id: autoButton
////// GuiMods - DarkMode
baseColor: !darkMode ? (autoButtonActive ? "red" : "grey") : (autoButtonActive ? "red" : "grey")
pressedColor: "#979797"
height: 40
width: parent.width - 6
anchors.horizontalCenter: parent.horizontalCenter
onClicked: buttonPress (3)
content: TileText
{
text: autoButtonText; font.bold: true;
color: autoButtonActive ? "white" : "black"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions