diff --git a/Sources/SiteKit/Plugins/OutputFileRenderer+PageShell.swift b/Sources/SiteKit/Plugins/OutputFileRenderer+PageShell.swift index 326576c..0885290 100644 --- a/Sources/SiteKit/Plugins/OutputFileRenderer+PageShell.swift +++ b/Sources/SiteKit/Plugins/OutputFileRenderer+PageShell.swift @@ -585,13 +585,24 @@ extension OutputFileRenderer { // Language picker shell (menu populated by theme JS for custom styling) if self.config.isMultilingual { let langUpper = self.uiStrings.locale.uppercased() - let globeIcon = "" + // Globe is a stroked circle of radius 10 (∅20), so like the theme toggle below it would + // otherwise render wider than the search lens (∅16). Same fix: pad the viewBox to + // -3 -3 30 30 so the drawn circle matches the magnifier lens while the 16×16 element box + // (and the button height/baseline) stays exactly the same. See the theme toggle for detail. + let globeIcon = "" navParts.append("
") } - // Theme toggle – inline SVG icon (no Font Awesome dependency) + // Theme toggle – inline SVG icon (no Font Awesome dependency). + // The contrast glyph is a filled disc of radius 10 (∅20 in a 24 viewBox), whereas the + // search magnifier is a stroked lens of radius 8 (∅16). At equal 16×16 boxes the filled + // disc therefore renders ~25% wider and far heavier than the magnifier, so the two header + // action icons look mismatched in size even though their button boxes are pixel-identical. + // Padding the viewBox to -3 -3 30 30 scales the drawn glyph to 0.8 (24/30) and keeps it + // centered, making the disc diameter equal the magnifier lens while the 16×16 element box – + // and thus the button height and baseline – stays exactly the same. if nav.showThemeToggle ?? true { - let themeIcon = "" + let themeIcon = "" navParts.append("") }