Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ export default function App() {
document.getElementById("root")?.style.setProperty("background", "transparent");
}

// HUD window is a small fixed-size BrowserWindow (`electron/windows.ts`), not a full-screen
// surface. Pin the document shell to that viewport and hide overflow so the renderer cannot
// introduce scrollbars. Without this, `h-full` in `LaunchWindow` has no definite height chain
// from `html`/`body`, and stray overflow can still appear on some hosts (see issue #305).
if (type === "hud-overlay") {
document.documentElement.style.height = "100%";
document.documentElement.style.overflow = "hidden";
document.body.style.height = "100%";
document.body.style.margin = "0";
document.body.style.overflow = "hidden";
const root = document.getElementById("root");
root?.style.setProperty("height", "100%");
root?.style.setProperty("min-height", "0");
root?.style.setProperty("overflow", "hidden");
}

// Load custom fonts on app initialization
loadAllCustomFonts().catch((error) => {
console.error("Failed to load custom fonts:", error);
Expand Down
7 changes: 6 additions & 1 deletion src/components/launch/LaunchWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,12 @@ export function LaunchWindow() {
};

return (
<div className={`w-screen h-screen bg-transparent ${styles.electronDrag}`}>
// Root fills the HUD window only. Avoid `w-screen`/`h-screen` (`100vw`/`100vh`): `100vw` can
// exceed the inner layout width when scrollbars affect the viewport (notably on Windows), which
// showed up as a horizontal scrollbar once recording widened the toolbar (issue #305).
<div
className={`h-full w-full min-w-0 max-w-full overflow-x-hidden overflow-y-hidden bg-transparent ${styles.electronDrag}`}
>
{/* Language switcher — top-left, beside traffic lights */}
<div
className={`fixed top-2 flex items-center gap-1 px-2 py-1 rounded-md text-white/50 hover:text-white/90 hover:bg-white/10 transition-all duration-150 ${isMac ? "left-[72px]" : "left-2"} ${styles.electronNoDrag}`}
Expand Down