Give the activity row a name Slint will accept
`ActivityItem inherits VerticalLayout` declared `in property <ActivityRow> row`, and every element that can sit in a GridLayout already carries a `row` for its grid placement — so the declaration was an override of a built-in rather than a new property, and the compiler refused it. dr-ui had not built since. Renamed to `job`, which is also the better word: the property is one background job, and `row` described where it was drawn rather than what it holds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -247,7 +247,7 @@ component EntryRow inherits VerticalLayout {
|
||||
// 1 (it finished, and a full bar is noise) or frozen part-way (it failed, and
|
||||
// a bar sitting at 60% invites the reading "still going").
|
||||
component ActivityItem inherits VerticalLayout {
|
||||
in property <ActivityRow> row;
|
||||
in property <ActivityRow> job;
|
||||
|
||||
spacing: 4px;
|
||||
|
||||
@@ -255,29 +255,29 @@ component ActivityItem inherits VerticalLayout {
|
||||
spacing: Theme.gap;
|
||||
|
||||
Label {
|
||||
text: root.row.title;
|
||||
text: root.job.title;
|
||||
body: true;
|
||||
// Faded once it is over: the list is ordered running-first, and
|
||||
// this is what makes that ordering visible at a glance rather than
|
||||
// something the reader has to work out from the text.
|
||||
opacity: root.row.running ? 1.0 : 0.6;
|
||||
opacity: root.job.running ? 1.0 : 0.6;
|
||||
}
|
||||
|
||||
Caption {
|
||||
text: root.row.detail;
|
||||
text: root.job.detail;
|
||||
// A failure is the one thing here worth a colour (NFR-A11Y-3 is
|
||||
// satisfied by the words, which say what failed; the hue only
|
||||
// finds them faster).
|
||||
warn: root.row.failed;
|
||||
warn: root.job.failed;
|
||||
horizontal-alignment: right;
|
||||
horizontal-stretch: 1;
|
||||
overflow: elide;
|
||||
}
|
||||
}
|
||||
|
||||
if root.row.running: ProgressBar {
|
||||
indeterminate: !root.row.determinate;
|
||||
fraction: root.row.fraction;
|
||||
if root.job.running: ProgressBar {
|
||||
indeterminate: !root.job.determinate;
|
||||
fraction: root.job.fraction;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ export component SettingsPage inherits Rectangle {
|
||||
}
|
||||
|
||||
for row in root.activity-rows: ActivityItem {
|
||||
row: row;
|
||||
job: row;
|
||||
}
|
||||
|
||||
if root.activity-kept > 0: Rectangle {
|
||||
|
||||
Reference in New Issue
Block a user