mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-01 17:03:19 +00:00
22 lines
454 B
Text
22 lines
454 B
Text
import { Palette } from "Palette.slint";
|
|
import { VText } from "Text.slint";
|
|
|
|
export component VLabeledComponent {
|
|
in property<string> label <=> labelComponent.text;
|
|
in property<bool> enabled: true;
|
|
|
|
VerticalLayout {
|
|
labelComponent := VText {
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
background: enabled ? Palette.control-background : Palette.control-background.darker(0.2);
|
|
border-radius: 4px;
|
|
VerticalLayout {
|
|
padding: 4px;
|
|
@children
|
|
}
|
|
}
|
|
}
|
|
}
|