mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-05 03:03:20 +00:00
Add source's name next to each task
This commit is contained in:
parent
e2cd994026
commit
a03e71890c
4 changed files with 20 additions and 2 deletions
|
@ -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}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue