slint/demos/home-automation/ui/components/info.slint
Nigel Breslaw 287a976bd0
Updated Home Automation demo (#7890)
Adds:

Kiosk mode. After 30 seconds demo will cycle through views.
Landscape support.
{ API } to work with the new data tab in live-preview.
SW Renderer support (use of PNG images over gradients, Rectangles, shadows, etc).
Removes side-bar and theming.
Refreshed look.
2025-03-21 19:04:58 +02:00

28 lines
No EOL
1.1 KiB
Text

// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: MIT
import { Palette,Measurements,Colors } from "../common.slint";
import { AppState } from "../appState.slint";
import { HaText } from "general/haText.slint";
import { InnerShadowRectangle } from "general/innerShadowRectangle.slint";
export component Info {
in property <string> name;
in property <string> id;
in property <bool> full-screen: false;
@children
if AppState.graphics-accelerator-available : Rectangle {
border-width: 3px;
border-color: @linear-gradient(150deg, white.transparentize(60%) 0%, white.transparentize(85%) 50%, #ffffff.transparentize(95%) 100%);
border-radius: 25px;
background: @linear-gradient(150deg, white.transparentize(60%) 0%, white.transparentize(85%) 40%, white.transparentize(85%) 60%, #ffffff.transparentize(60%) 100%);
}
if !AppState.graphics-accelerator-available : Image {
x: -14px;
y: -12px;
width: parent.width + 33px;
height: parent.height + 34px;
source: @image-url("../images/info-frame.png", nine-slice(30 50 35 30));
}
}