diff --git a/crates/tunal/ui/components/list-row.slint b/crates/tunal/ui/components/list-row.slint index 7b1c9d8..4950646 100644 --- a/crates/tunal/ui/components/list-row.slint +++ b/crates/tunal/ui/components/list-row.slint @@ -62,12 +62,13 @@ export component ListRow inherits StateLayer { } HorizontalLayout { - padding-left: root.shaped ? Theme.space-1 : Theme.space-4; + padding-left: root.shaped ? Theme.space-2 : Theme.space-4; padding-right: Theme.space-2; spacing: Theme.space-3; if root.icon != "" && root.shaped: VerticalLayout { alignment: center; + min-width: root.shape-size; Shape { size: root.shape-size; diff --git a/crates/tunal/ui/components/shape.slint b/crates/tunal/ui/components/shape.slint index 20d8efe..1aa5916 100644 --- a/crates/tunal/ui/components/shape.slint +++ b/crates/tunal/ui/components/shape.slint @@ -59,11 +59,19 @@ export component Shape { width: root.size; height: root.size; + // A square in the middle (a layout that squeezes one side must not cut the outline), with + // a margin round the 100-unit outline: the software renderer cuts a path flat where it + // meets its element's left and right edges. + property side: min(root.width, root.height); Path { - width: 100%; - height: 100%; - viewbox-width: 100; - viewbox-height: 100; + width: root.side * (1 + 2 * Theme.shape-margin); + height: self.width; + x: (root.width - self.width) / 2; + y: (root.height - self.height) / 2; + viewbox-x: -100 * Theme.shape-margin; + viewbox-y: -100 * Theme.shape-margin; + viewbox-width: 100 * (1 + 2 * Theme.shape-margin); + viewbox-height: self.viewbox-width; fill: root.active ? root.active-fill : root.fill; commands: Shapes.path(root.shape, root.active-shape, root.t, root.turn + root.t * Theme.shape-morph-turn); animate fill { diff --git a/crates/tunal/ui/shell/breadcrumb.slint b/crates/tunal/ui/shell/breadcrumb.slint index a1ee8f2..58c3776 100644 --- a/crates/tunal/ui/shell/breadcrumb.slint +++ b/crates/tunal/ui/shell/breadcrumb.slint @@ -19,6 +19,8 @@ component CrumbChip inherits StateLayer { in property name; in property glyph; in property last; + // Only this chip gives up width (eliding its name) when the bar is short. + in property shrink; property content: root.last ? Theme.on-secondary-container : Theme.on-surface-variant; @@ -51,6 +53,7 @@ component CrumbChip inherits StateLayer { } Text { + min-width: root.shrink ? 0 : self.preferred-width; text: root.name; color: root.content; font-size: Theme.label-large.size; @@ -119,7 +122,11 @@ export component Breadcrumb inherits Rectangle { } } + // Crumbs keep their natural width; when they don't fit, the first one elides, and past + // that the row slides left so the current folder stays in view. if !root.editing: HorizontalLayout { + x: min(0, root.width - self.width); + width: max(root.width, self.min-width); padding-left: Theme.space-1; padding-right: Theme.space-4; alignment: start; @@ -138,6 +145,7 @@ export component Breadcrumb inherits Rectangle { name: crumb.name; glyph: crumb.glyph; last: i == root.crumbs.length - 1; + shrink: i == 0 && root.crumbs.length > 1; clicked => { root.go(i); } diff --git a/crates/tunal/ui/theme.slint b/crates/tunal/ui/theme.slint index 689d970..cd594d0 100644 --- a/crates/tunal/ui/theme.slint +++ b/crates/tunal/ui/theme.slint @@ -58,6 +58,8 @@ export global Theme { out property corner-menu-item: 10px; // Degrees a shaped container turns while it morphs to its active shape. out property shape-morph-turn: 20; + // Room round a shape's outline inside its path, as a share of its size. + out property shape-margin: 0.1; // Degrees a dialog's header shape turns through while the dialog opens. out property shape-enter-turn: -60; // Wavy progress line: stroke, height of the wave above its centre, one wavelength. diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md index f826994..e23844f 100644 --- a/docs/PROGRESS.md +++ b/docs/PROGRESS.md @@ -135,7 +135,8 @@ One entry per session, newest last, ≤ 15 lines: done, verified how, not done, - Shell: window on `surface-container`, content (toolbar, panes, status) on a rounded `surface` card with a faint lift; sidebar rows shaped (resting shapes cycle, current = cookie9); tonal toolbar circles; current crumb a filled pill. Views: shaped glyphs per category in rows (32 px) and grid (56 px, tiles are `surface-container-low` cards); content rises `rise-shift` as it fades in. `Dialog.glyph` (cookie6 that turns in while opening, centred title; set on every dialog); menus 14 px with 36 px item pills; toasts 56 px, `corner-lg`, wavy progress (moves only while the job runs, still under reduced motion). - Verified: workspace build, clippy -D warnings, fmt --check, literal grep empty; looked at gallery light/dark, shell light (split, real places), music folder dark, grid dark, menu + toasts, dialog dark, settings dialog. - Not done: ripple/morph motion not watched (single frames); the software renderer draws stroked paths unevenly, so the wave is a filled band. Settings page list still plain rows. -- Later: tune clover depth (reads like a plus); shaped rows in the settings nav. +- Fix: shapes kept a margin in their path (the software renderer cut tips flat at the element's left/right edge; `Theme.shape-margin`); breadcrumb crumbs keep natural width, only the first elides, then the row slides left so the current folder stays visible. +- Later: tune clover depth (reads like a plus); shaped rows in the settings nav; user asked for an "Icon style" setting (shaped / plain glyphs / system icon theme via `IconTheme`). ## S027 — ssh config and known_hosts - Done: `tunal-net` `ssh_config::SshConfig` (`load_default()`, `load(file, ssh_dir)`, `parse(text, ssh_dir)`, `hosts()` = concrete aliases in file order, `resolve(alias) -> Resolved {alias, host_name, port (22), user, identity_files, identities_only, unsupported_proxy}`): first value wins per option, identity files collect from all matching blocks, negated patterns win, `Match` blocks skipped, `Include` (globs, `~`, relative to ~/.ssh, depth 8), ProxyJump/ProxyCommand set `unsupported_proxy`. `known_hosts::KnownHosts` (`load_default()` reads ~/.ssh/known_hosts + own file, `add_file`, `add_text`, `check(host, port, key_type, key_b64) -> HostCheck::{Match, Mismatch, Unknown, Revoked}`): plain (comma lists, wildcards, `!`), hashed `|1|` HMAC-SHA1, `[host]:port`, `@revoked`, `@cert-authority` ignored. `own_file()` = `$XDG_CONFIG_HOME/tunal/known_hosts`; `accept_key(file, host, port, key_type, key_b64)` appends one line (creates dirs) and refuses paths under ~/.ssh.