58 lines
1.8 KiB
Plaintext
58 lines
1.8 KiB
Plaintext
// Copyright (C) 2026 Hector van der Aa <hector@h3cx.dev>
|
|
// Copyright (C) 2026 Association Exergie <association.exergie@gmail.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
import { Palette } from "../palette.slint";
|
|
export component WindowHeader {
|
|
|
|
in property <string> title;
|
|
HorizontalLayout {
|
|
horizontal-stretch: 1;
|
|
Rectangle {
|
|
border-top-left-radius: 8px;
|
|
border-top-right-radius: 8px;
|
|
background: Palette.border;
|
|
HorizontalLayout {
|
|
VerticalLayout {
|
|
alignment: center;
|
|
padding-left: 6px;
|
|
Rectangle {
|
|
vertical-stretch: 1;
|
|
Text {
|
|
text: title;
|
|
color: Palette.text-primary;
|
|
horizontal-alignment: center;
|
|
font-size: 14px;
|
|
}
|
|
}
|
|
}
|
|
|
|
Rectangle {
|
|
horizontal-stretch: 1;
|
|
}
|
|
|
|
HorizontalLayout {
|
|
padding: 4px;
|
|
Rectangle {
|
|
width: 12px;
|
|
height: 12px;
|
|
background: Palette.warning;
|
|
border-radius: self.width / 2;
|
|
y: (parent.height - self.height) / 2;
|
|
}
|
|
}
|
|
|
|
HorizontalLayout {
|
|
padding: 4px;
|
|
Rectangle {
|
|
width: 12px;
|
|
height: 12px;
|
|
background: Palette.error;
|
|
border-radius: self.width / 2;
|
|
y: (parent.height - self.height) / 2;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|