Add mock timeline-block checkbox

This commit is contained in:
2026-06-03 23:42:11 +02:00
parent 39488ec094
commit 0f4391d388
3 changed files with 123 additions and 12 deletions

View File

@@ -40,25 +40,45 @@ component TimelineBlock inherits VerticalLayout {
property <length> image-size: calc-image-size();
property <length> image-size-with-margin: image-size + Global.image-margin;
property <length> title-box-height: 36px;
height: title-box.height + count-y * image-size-with-margin;
property <length> title-box-height: 44px;
height: title-box-height + count-y * image-size-with-margin;
y: bucket.y;
min-width: min-image-size;
alignment: start;
title-box := HorizontalLayout {
alignment: space-between;
height: title-box-height;
padding: 8px;
title-box := Rectangle {
property <bool> checked: false;
Text {
text: bucket.title;
HorizontalLayout {
alignment: space-between;
height: title-box-height;
padding: 8px;
title := Text {
text: bucket.title;
font-size: 20px;
}
if !checked : Image {
source: @image-url("../assets/unchecked.svg");
colorize: #aaa;
height: title.height;
width: self.height;
}
if checked : Image {
source: @image-url("../assets/checked.svg");
colorize: #accbfa;
height: title.height;
width: self.height;
}
}
// TODO: checkbox thingy
Text {
text: "O";
title-touch := TouchArea {
clicked => {
parent.checked = !parent.checked;
}
}
}