From 0fce9e01c8f9b0adc23212377e12ab67e824714d Mon Sep 17 00:00:00 2001 From: Steffen Becker Date: Wed, 12 Aug 2026 17:18:58 +0200 Subject: [PATCH] fix: the ribbon on a narrow window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three failures from one cause — nothing had a floor. The Styles group is the only one that may shrink, so it absorbed everything down to 8px: an empty gallery frame whose label reached across the next group's. It now stops at two tiles, the label truncates, and the tab strip wraps rather than pushing the page into a horizontal scroll that left the band ending short of its own tabs. --- src/lib/components/ribbon/Ribbon.svelte | 4 ++++ src/lib/components/ribbon/RibbonGroup.svelte | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib/components/ribbon/Ribbon.svelte b/src/lib/components/ribbon/Ribbon.svelte index 78e306e..a933e62 100644 --- a/src/lib/components/ribbon/Ribbon.svelte +++ b/src/lib/components/ribbon/Ribbon.svelte @@ -370,8 +370,12 @@ .ribbon :global(.bp-trigger) { height: 30px; } + /* Wraps once the tabs, the name and the chrome buttons stop fitting. It cannot + scroll like the band does: the File and appearance menus drop from inside it, + and a scroll container would clip them. */ .ribbon-tabs { display: flex; + flex-wrap: wrap; align-items: center; gap: 2px; padding: 5px 10px 0; diff --git a/src/lib/components/ribbon/RibbonGroup.svelte b/src/lib/components/ribbon/RibbonGroup.svelte index 8fef165..983e77c 100644 --- a/src/lib/components/ribbon/RibbonGroup.svelte +++ b/src/lib/components/ribbon/RibbonGroup.svelte @@ -34,9 +34,12 @@ padding: 2px 4px 0; } + /* Takes the slack, but the only group that may shrink must still stop: crushed + to nothing it shows an empty frame and spills its label onto the next group's. + Two tiles plus the gallery's own chevron; past that the band scrolls. */ .ribbon-group.grow { flex: 1; - min-width: 0; + min-width: 163px; } .ribbon-group-items { @@ -56,11 +59,16 @@ height: 15px; } + /* Truncates rather than reaching into the next group: a translation longer than + its group's controls must read as cut off, not as two labels run together. */ .ribbon-group-label { + min-width: 0; font-family: var(--w-font); font-size: 11px; color: var(--w-text-dim); white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .ribbon-launcher {