32 lines
No EOL
737 B
Text
32 lines
No EOL
737 B
Text
import { VerticalBox, HorizontalBox } from "std-widgets.slint";
|
|
|
|
// Container Component
|
|
export component Container {
|
|
in property <length> container-max-width: 1200px;
|
|
in property <length> container-padding: 16px;
|
|
|
|
HorizontalBox {
|
|
alignment: center;
|
|
|
|
Rectangle {
|
|
max-width: root.container-max-width;
|
|
|
|
VerticalBox {
|
|
padding: root.container-padding;
|
|
@children
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Grid Component
|
|
export component Grid {
|
|
in property <length> gap: 16px;
|
|
in property <int> columns: 2;
|
|
|
|
// Basic grid implementation - can be enhanced
|
|
VerticalBox {
|
|
spacing: root.gap;
|
|
@children
|
|
}
|
|
} |