Say what the application is doing, in one bar and one list
Every background job reported into a window property of its own — library-thumbs-done, library-pin-total, library-syncing — which only the grid ever read. A pin download that outlived the view it was started from drew nothing at all once the user opened an image, and there was no answer anywhere to "what is this busy with", because the answer was spread across eight properties nothing collected. They report to one register now (ui/dr-ui/src/activity.rs). It publishes an aggregate, which draws a three-pixel bar across the top of the shell in every view, and a row per job, which the settings page lists: scans, thumbnail batches, pin and open downloads, sidecar uploads, the sync and the trash. Failures stay on the list until they are cleared; routine successes do not, or a scroll would bury them. The handle removes a still-running job when it drops, so a worker that dies mid-transfer takes its row with it rather than leaving the bar sweeping for the rest of the session. Also carries in-flight work from a parallel session — the drawn icon set and the dr-pipeline ops split. dr-pipeline's build script does not compile at this commit; ui/dr-ui does, with clippy clean and its tests passing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
// release rather than the drop being silently discarded after it.
|
||||
|
||||
import { Theme } from "theme.slint";
|
||||
import { Button } from "widgets.slint";
|
||||
import { Button, Icon } from "widgets.slint";
|
||||
|
||||
// One row of the collection tree.
|
||||
export struct CollectionRow {
|
||||
@@ -130,12 +130,12 @@ component TreeRow inherits Rectangle {
|
||||
Rectangle {
|
||||
width: 14px;
|
||||
|
||||
if root.entry.has-children: Text {
|
||||
text: root.entry.expanded ? "▾" : "▸";
|
||||
color: Theme.ink-faint;
|
||||
font-size: Theme.text-sm;
|
||||
horizontal-alignment: center;
|
||||
vertical-alignment: center;
|
||||
if root.entry.has-children: Icon {
|
||||
name: root.entry.expanded ? "chevron-down" : "chevron-right";
|
||||
ink: Theme.ink-faint;
|
||||
size: 10px;
|
||||
x: (parent.width - self.width) / 2;
|
||||
y: (parent.height - self.height) / 2;
|
||||
}
|
||||
|
||||
// Its own hit area: toggling open must not also select, or every
|
||||
@@ -148,11 +148,11 @@ component TreeRow inherits Rectangle {
|
||||
// Smart collections read differently from manual ones — the icon is
|
||||
// the only cue that its contents are computed, and that dropping
|
||||
// images on it will be refused.
|
||||
Text {
|
||||
text: root.entry.smart ? "◈" : "▤";
|
||||
color: root.entry.smart ? Theme.active-dim : Theme.ink-faint;
|
||||
font-size: Theme.text-sm;
|
||||
vertical-alignment: center;
|
||||
Icon {
|
||||
name: root.entry.smart ? "collection-smart" : "collection";
|
||||
ink: root.entry.smart ? Theme.active-dim : Theme.ink-faint;
|
||||
size: 12px;
|
||||
y: (parent.height - self.height) / 2;
|
||||
}
|
||||
|
||||
// The name, or the field that is replacing it while this row is being
|
||||
@@ -337,7 +337,7 @@ export component CollectionsPanel inherits Rectangle {
|
||||
horizontal-stretch: 1;
|
||||
}
|
||||
|
||||
// New collection. A glyph rather than a word: the header is 232px
|
||||
// New collection. A mark rather than a word: the header is 232px
|
||||
// wide and the label would crowd out the title.
|
||||
Rectangle {
|
||||
width: 22px;
|
||||
@@ -347,12 +347,12 @@ export component CollectionsPanel inherits Rectangle {
|
||||
: (add-touch.has-hover ? Theme.hover : transparent);
|
||||
border-radius: Theme.radius-sm;
|
||||
|
||||
Text {
|
||||
text: "+";
|
||||
color: Theme.ink-dim;
|
||||
font-size: Theme.text-lg;
|
||||
horizontal-alignment: center;
|
||||
vertical-alignment: center;
|
||||
Icon {
|
||||
name: "plus";
|
||||
ink: Theme.ink-dim;
|
||||
size: 12px;
|
||||
x: (parent.width - self.width) / 2;
|
||||
y: (parent.height - self.height) / 2;
|
||||
}
|
||||
add-touch := TouchArea {
|
||||
clicked => { root.new-collection(); }
|
||||
@@ -494,11 +494,11 @@ export component CollectionsPanel inherits Rectangle {
|
||||
padding-right: Theme.gap-sm;
|
||||
spacing: Theme.gap-sm;
|
||||
|
||||
Text {
|
||||
text: "🗑";
|
||||
color: root.trash-count > 0 ? Theme.warn-ink : Theme.ink-faint;
|
||||
font-size: Theme.text-sm;
|
||||
vertical-alignment: center;
|
||||
Icon {
|
||||
name: "trash";
|
||||
ink: root.trash-count > 0 ? Theme.warn-ink : Theme.ink-faint;
|
||||
size: 12px;
|
||||
y: (parent.height - self.height) / 2;
|
||||
}
|
||||
|
||||
Text {
|
||||
|
||||
Reference in New Issue
Block a user