ui: count the third item gap in the mode bar's right-hand width

The print, save and info buttons each have 4 pt after them (three gaps), so the
reserved width is 116 pt, not 112; the search field no longer overlaps the tabs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
vangel76andClaude Sonnet 5.5 committed 2026-11-07 16:42:02 +01:00
1 parent 32085b951e
commit 95f8eaa63f
1 file changed
+3 -2
+3 -2
View File
@@ -470,8 +470,9 @@ fn tab(
theme::hand(resp).on_hover_text(if dirty { crate::i18n::fmt(tl!("{name} — unsaved changes"), &[("name", &shown)]) } else { shown })
}
/// Width the print, save and info buttons and their gaps take in the mode bar.
const MODE_BAR_RIGHT: f32 = 3.0 * 32.0 + 2.0 * 4.0 + 8.0;
/// Width the print, save and info buttons and their gaps take in the mode bar: three buttons, the
/// 4 pt `item_spacing` after each of them (three gaps, not two), and the 8 pt spacer.
const MODE_BAR_RIGHT: f32 = 3.0 * 32.0 + 3.0 * 4.0 + 8.0;
/// Narrowest search field the mode bar shows; below it the field becomes an icon button.
const MODE_BAR_SEARCH_MIN: f32 = 140.0;