Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RobDuthie opened this issue Sep 28, 2024 · 2 comments
Open

Comments

@RobDuthie
Copy link

RobDuthie commented Sep 28, 2024

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"

@RobDuthie RobDuthie changed the title Relay colour button change on operation for conformatley Relay colour button change on operation for comformity of switching Sep 28, 2024
@kwindrem
Copy link
Owner

Thanks. I am making some changes to colors to make things more obvious based on your input but didn't want to make on = danger (red) nor off = safe (green) in all cases.

@RobDuthie
Copy link
Author

RobDuthie commented Sep 29, 2024

Wrote a scripe file to stop the undate changes, as the red and green is much better in dark mode, Try it on the next rewrite, as its only for the relay controls.? As most PLC electrical control system use this colour coding for safety indicators.

Scripe line added to rcS.local in /data/
Just need to add amended file to the /data/ folder TileRelay.qml
cp /data/TileRelay.qml /opt/victronenergy/gui/qml/TileRelay.qml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants