From 5d278be3735eba30df5a4371443256511cbbb20c Mon Sep 17 00:00:00 2001 From: astar76 Date: Wed, 18 Nov 2026 20:06:39 -0600 Subject: [PATCH] S014: centre breadcrumb crumbs vertically, keep crumb widths so they never overlap Crumbs sat at the top of the 40 px bar (a layout puts a fixed-height child at the top) and a 32 px min-width let later crumbs shrink under their labels. Trailing padding trimmed so the root crumb has more room. Co-Authored-By: Claude Opus 5.5 --- crates/tunal/ui/shell/breadcrumb.slint | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/tunal/ui/shell/breadcrumb.slint b/crates/tunal/ui/shell/breadcrumb.slint index 7fa4985..e9d3efb 100644 --- a/crates/tunal/ui/shell/breadcrumb.slint +++ b/crates/tunal/ui/shell/breadcrumb.slint @@ -26,7 +26,6 @@ component CrumbChip inherits StateLayer { property content: root.last ? Theme.on-secondary-container : Theme.on-surface-variant; height: 32px; - min-width: 32px; border-radius: Theme.corner-full(self.height); // The current folder is a filled pill; the crumbs before it show only on hover. background: root.last ? Theme.secondary-container : transparent; @@ -129,7 +128,7 @@ export component Breadcrumb inherits Rectangle { x: min(0, root.width - self.width); width: max(root.width, self.min-width); padding-left: Theme.space-1; - padding-right: Theme.space-4; + padding-right: Theme.space-1; alignment: start; for crumb[i] in root.crumbs: HorizontalLayout { @@ -142,6 +141,9 @@ export component Breadcrumb inherits Rectangle { } } + // Centred in the bar's height: a layout puts a fixed-height child at the top. + VerticalLayout { + alignment: center; CrumbChip { name: crumb.name; glyph: crumb.glyph; @@ -157,6 +159,7 @@ export component Breadcrumb inherits Rectangle { radius: parent.border-radius; } } + } } }