Loading files
import { Data } from "../api.slint";
export component CategoryTreeLabel inherits VerticalLayout {
in property <[string]> names;
in property <color> color: Data.theme.base-text;
// Accessibility
accessible-role: text;
accessible-description: "category";
accessible-label: names[names.length - 1]; // Not ideal, but how else?
for name[index] in names: HorizontalLayout {
padding-left: index * 8px;
row-txt := Text {
color: color;
font-weight: (index == (names.length - 1)) ? 600 : 400;
vertical-alignment: center;
overflow: elide;
text: ((index > 0) ? "⤷ " : "") + name;
accessible-role: none;
}
}
}
c730ec352This file is pinned to the selected release. Download the original to open it in your design tool.