Add source's name next to each task

This commit is contained in:
Vyn 2025-02-02 11:42:28 +01:00
parent e2cd994026
commit a03e71890c
4 changed files with 20 additions and 2 deletions

View file

@ -1,5 +1,5 @@
import { ToggleButton } from "@selenite";
import { VPopupIconMenu, VTag, VButton, VActionButton, VCheckBox, Svg, Palette } from "@selenite";
import { VPopupIconMenu, VTag, VText, VButton, VActionButton, VCheckBox, Svg, Palette } from "@selenite";
import { TaskEdit } from "./TaskEdit.slint";
import { Date } from "std-widgets.slint";
@ -12,6 +12,8 @@ export struct TaskLineEditData {
export component TaskLine inherits VerticalLayout {
in property<string> title;
in property<string> source-name;
in property<bool> hide-source-name;
in property<bool> scheduled;
in property<Date> date;
in property<bool> checked;
@ -82,12 +84,16 @@ export component TaskLine inherits VerticalLayout {
alignment: start;
spacing: 8px;
checkbox := VCheckBox {
text: root.title;
text: "\{root.title}";
checked: root.checked;
toggled => {
root.toggle-check()
}
}
if !hide-source-name : source-name := VTag {
text-color: Palette.accent;
text: "\{root.source-name}";
}
}
}
}