fmeditor-slint/ui/widgets/panel.slint

19 lines
515 B
Plaintext
Raw Permalink Normal View History

2024-04-10 12:28:43 +00:00
import { Metrics, DarkPalette } from "../theme.slint";
2024-04-10 12:40:35 +00:00
import { VerticalBox } from "layout.slint";
2024-04-09 21:12:54 +00:00
2024-04-10 12:28:43 +00:00
export component Panel inherits VerticalBox {
in property <string> p-title: "Title";
in property <TextHorizontalAlignment> p-title-alignment: left;
2024-04-09 21:12:54 +00:00
c-title := Text {
2024-04-10 12:28:43 +00:00
height: Metrics.size-md;
color: DarkPalette.text[4];
font-size: Metrics.font-md;
text: p-title;
2024-04-10 12:28:43 +00:00
vertical-alignment: center;
horizontal-alignment: p-title-alignment;
2024-04-09 21:12:54 +00:00
}
2024-04-10 12:28:43 +00:00
@children
2024-04-09 21:12:54 +00:00
}