1786049958

This commit is contained in:
2026-08-06 22:59:18 +02:00
parent f62d6e7510
commit b469350f8a

View File

@@ -9,6 +9,26 @@ import { Horizontal, Vertical, Switch } from "./material.slint";
import "./fonts/Roboto-VariableFont.ttf";
import { FilledIcons, OutlinedIcons } from "./icons.slint";
component LightSwitch inherits Horizontal {
in property <string> text: "";
in property <bool> checked: false;
in property <bool> enabled: true;
alignment: end;
Text {
text: root.text;
vertical-alignment: center;
horizontal-alignment: right;
font-size: 18px;
font-weight: root.checked ? 700 : 500;
}
Switch {
enabled: root.enabled;
checked: root.checked;
}
}
// The window the user interacts with. Edits to the inputs propagate to
// the SystemTrayIcon instance via the host language's callbacks.
export component MainWindow inherits Window {
@@ -101,117 +121,40 @@ export component MainWindow inherits Window {
Vertical {
alignment: start;
Horizontal {
alignment: end;
Text {
text: "Armory Light";
vertical-alignment: center;
horizontal-alignment: right;
font-size: 18px;
font-weight: 500;
}
Switch {
checked: false;
}
LightSwitch {
text: "Armory Light";
}
Horizontal {
alignment: end;
Text {
text: "Bedroom Light";
vertical-alignment: center;
horizontal-alignment: right;
font-size: 18px;
font-weight: 500;
}
Switch {
checked: false;
}
LightSwitch {
text: "Bedroom Light";
}
Horizontal {
alignment: end;
Text {
text: "Hallway Light";
vertical-alignment: center;
horizontal-alignment: right;
font-size: 18px;
font-weight: 500;
}
Switch {
checked: false;
}
LightSwitch {
text: "Hallway Light";
}
Horizontal {
alignment: end;
Text {
text: "Kitchen Light";
vertical-alignment: center;
horizontal-alignment: right;
font-size: 18px;
font-weight: 500;
}
Switch {
checked: false;
}
LightSwitch {
text: "Kitchen Light";
}
Horizontal {
alignment: end;
Text {
text: "Living Room Light";
vertical-alignment: center;
horizontal-alignment: right;
font-size: 18px;
font-weight: 700;
}
Switch {
checked: true;
}
LightSwitch {
text: "Living Room Light";
enabled: true;
}
Horizontal {
alignment: end;
Text {
text: "Shower Light";
vertical-alignment: center;
horizontal-alignment: right;
font-size: 18px;
font-weight: 500;
}
Switch {
checked: false;
}
LightSwitch {
text: "Shower Light";
}
Horizontal {
alignment: end;
Text {
text: "Utilities Light";
vertical-alignment: center;
horizontal-alignment: right;
font-size: 18px;
font-weight: 500;
}
Switch {
enabled: false;
checked: false;
}
LightSwitch {
text: "Utilities Light";
enabled: false;
checked: false;
}
Horizontal {
alignment: end;
Text {
text: "WC Light";
vertical-alignment: center;
horizontal-alignment: right;
font-size: 18px;
font-weight: 500;
}
Switch {
checked: false;
}
LightSwitch {
text: "WC Light";
}
}
}