diff --git a/ui/main.slint b/ui/main.slint index 1be1c63..c5d082b 100644 --- a/ui/main.slint +++ b/ui/main.slint @@ -288,8 +288,6 @@ export component AppWindow inherits Window { in property next-event-label: "NEXT EVENT"; in property next-event-title: "LOADING CALENDAR"; in property next-event-time: "--"; - in property battery-level: "--%"; - in property battery-kind: "battery"; in property updated-text: "WAITING FOR HOME ASSISTANT"; in property action-status: "TAP A ROOM TO CONTROL"; in property lights-summary: "LOADING LIGHTS"; @@ -360,26 +358,6 @@ export component AppWindow inherits Window { vertical-alignment: center; } - if root.battery-kind == "battery-charging": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 552px; y: 34px; width: 34px; height: 30px; source: @image-url("icons/battery-charging.svg"); image-fit: contain; } - if root.battery-kind == "battery-full": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 552px; y: 34px; width: 34px; height: 30px; source: @image-url("icons/battery-full.svg"); image-fit: contain; } - if root.battery-kind == "battery-medium": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 552px; y: 34px; width: 34px; height: 30px; source: @image-url("icons/battery-medium.svg"); image-fit: contain; } - if root.battery-kind == "battery-low": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 552px; y: 34px; width: 34px; height: 30px; source: @image-url("icons/battery-low.svg"); image-fit: contain; } - if root.battery-kind == "battery": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 552px; y: 34px; width: 34px; height: 30px; source: @image-url("icons/battery.svg"); image-fit: contain; } - if root.battery-kind == "plug": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 552px; y: 34px; width: 34px; height: 30px; source: @image-url("icons/plug.svg"); image-fit: contain; } - - Text { - x: 590px; - y: 32px; - width: 66px; - height: 36px; - text: root.battery-level; - color: Settings.dark-mode ? #777777 : black; - font-size: 17px; - font-weight: 700; - horizontal-alignment: right; - vertical-alignment: center; - } - Rectangle { x: parent.width - 66px; y: 19px; @@ -445,16 +423,16 @@ export component AppWindow inherits Window { vertical-alignment: center; } - if root.weather-kind == "sun": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 520px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/sun.svg"); image-fit: contain; } - if root.weather-kind == "cloud-sun": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 520px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud-sun.svg"); image-fit: contain; } - if root.weather-kind == "cloud-moon": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 520px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud-moon.svg"); image-fit: contain; } - if root.weather-kind == "cloud": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 520px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud.svg"); image-fit: contain; } - if root.weather-kind == "cloud-rain": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 520px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud-rain.svg"); image-fit: contain; } - if root.weather-kind == "cloud-rain-wind": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 520px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud-rain-wind.svg"); image-fit: contain; } - if root.weather-kind == "cloud-lightning": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 520px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud-lightning.svg"); image-fit: contain; } - if root.weather-kind == "snowflake": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 520px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/snowflake.svg"); image-fit: contain; } - if root.weather-kind == "cloud-fog": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 520px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud-fog.svg"); image-fit: contain; } - if root.weather-kind == "moon": Image { image-rendering: smooth; colorize: Settings.dark-mode ? #777777 : black; x: 520px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/moon.svg"); image-fit: contain; } + if root.weather-kind == "sun": Image { colorize: Settings.dark-mode ? #777777 : black; x: root.width - 38px - 120px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/sun.svg"); image-fit: contain; } + if root.weather-kind == "cloud-sun": Image { colorize: Settings.dark-mode ? #777777 : black; x: root.width - 38px - 120px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud-sun.svg"); image-fit: contain; } + if root.weather-kind == "cloud-moon": Image { colorize: Settings.dark-mode ? #777777 : black; x: root.width - 38px - 120px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud-moon.svg"); image-fit: contain; } + if root.weather-kind == "cloud": Image { colorize: Settings.dark-mode ? #777777 : black; x: root.width - 38px - 120px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud.svg"); image-fit: contain; } + if root.weather-kind == "cloud-rain": Image { colorize: Settings.dark-mode ? #777777 : black; x: root.width - 38px - 120px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud-rain.svg"); image-fit: contain; } + if root.weather-kind == "cloud-rain-wind": Image { colorize: Settings.dark-mode ? #777777 : black; x: root.width - 38px - 120px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud-rain-wind.svg"); image-fit: contain; } + if root.weather-kind == "cloud-lightning": Image { colorize: Settings.dark-mode ? #777777 : black; x: root.width - 38px - 120px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud-lightning.svg"); image-fit: contain; } + if root.weather-kind == "snowflake": Image { colorize: Settings.dark-mode ? #777777 : black; x: root.width - 38px - 120px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/snowflake.svg"); image-fit: contain; } + if root.weather-kind == "cloud-fog": Image { colorize: Settings.dark-mode ? #777777 : black; x: root.width - 38px - 120px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/cloud-fog.svg"); image-fit: contain; } + if root.weather-kind == "moon": Image { colorize: Settings.dark-mode ? #777777 : black; x: root.width - 38px - 120px; y: 20px; width: 120px; height: 105px; source: @image-url("icons/moon.svg"); image-fit: contain; } Text { x: 392px;