Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

Refine HUD menu controls and positioning

webadderall440aef95abf9
diff --git a/electron/windows.ts b/electron/windows.ts
index 81a3d260..05b35dff 100644
--- a/electron/windows.ts
+++ b/electron/windows.ts
@@ -22,6 +22,11 @@ let hudOverlayCaptureProtectionLoaded = false;
let countdownWindow: BrowserWindow | null = null;
const HUD_OVERLAY_SETTINGS_FILE = path.join(app.getPath("userData"), "hud-overlay-settings.json");
+const HUD_BOTTOM_CLEARANCE_CM = 7;
+const DIP_PER_INCH = 96;
+const CM_PER_INCH = 2.54;
+const HUD_EDGE_MARGIN_DIP = 16;
+const HUD_SHADOW_BLEED_DIP = 20;
function isHudOverlayCaptureProtectionSupported(): boolean {
return process.platform !== "linux";
@@ -105,21 +110,30 @@ export function createHudOverlayWindow(): BrowserWindow {
loadHudOverlayCaptureProtectionSetting();
const primaryDisplay = getScreen().getPrimaryDisplay();
- const { workArea } = primaryDisplay;
+ const { bounds, workArea } = primaryDisplay;
const windowWidth = 720;
- const windowHeight = 520;
+ const windowHeight = 520 + HUD_SHADOW_BLEED_DIP;
+ const bottomClearanceDip = Math.round((HUD_BOTTOM_CLEARANCE_CM / CM_PER_INCH) * DIP_PER_INCH);
+ const screenBottom = bounds.y + bounds.height;
+ const workAreaBottom = workArea.y + workArea.height;
+ const preferredBottom = screenBottom - bottomClearanceDip;
+ const maximumSafeBottom = workAreaBottom - HUD_EDGE_MARGIN_DIP;
+ const windowBottom = Math.min(preferredBottom, maximumSafeBottom);
const x = Math.floor(workArea.x + (workArea.width - windowWidth) / 2);
- const y = Math.floor(workArea.y + workArea.height - windowHeight - 5);
+ const y = Math.max(
+ workArea.y + HUD_EDGE_MARGIN_DIP,
+ Math.floor(windowBottom - windowHeight),
+ );
const win = new BrowserWindow({
width: windowWidth,
height: windowHeight,
minWidth: 720,
maxWidth: 720,
- minHeight: 520,
- maxHeight: 520,
+ minHeight: windowHeight,
+ maxHeight: windowHeight,
x: x,
y: y,
frame: false,
diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsx
index 5a7504df..0764d282 100644
--- a/src/components/launch/LaunchWindow.tsx
+++ b/src/components/launch/LaunchWindow.tsx
@@ -471,7 +471,7 @@ export function LaunchWindow() {
return (
<div
- className="w-full flex flex-col bg-transparent overflow-hidden"
+ className="w-full flex flex-col bg-transparent overflow-visible pb-5"
style={{ height: "100vh" }}
ref={dropdownRef}
>
@@ -534,6 +534,16 @@ export function LaunchWindow() {
{activeDropdown === "mic" && (
<>
<div className={styles.ddLabel}>{t("recording.microphone")}</div>
+ <DropdownItem
+ icon={systemAudioEnabled ? <Volume2 size={16} /> : <VolumeX size={16} />}
+ selected={systemAudioEnabled}
+ onClick={() => {
+ setSystemAudioEnabled(!systemAudioEnabled);
+ }}
+ >
+ {systemAudioEnabled ? t("recording.disableSystemAudio") : t("recording.enableSystemAudio")}
+ </DropdownItem>
+ <Separator />
{microphoneEnabled && (
<DropdownItem
icon={<MicOff size={16} />}
@@ -636,6 +646,18 @@ export function LaunchWindow() {
{activeDropdown === "more" && (
<>
+ {supportsHudCaptureProtection && (
+ <DropdownItem
+ icon={hideHudFromCapture ? <EyeOff size={16} /> : <Eye size={16} />}
+ selected={hideHudFromCapture}
+ onClick={() => {
+ void toggleHudCaptureProtection();
+ }}
+ >
+ {hideHudFromCapture ? t("recording.hideHudFromVideo") : t("recording.showHudInVideo")}
+ </DropdownItem>
+ )}
+ {supportsHudCaptureProtection && <Separator />}
<DropdownItem icon={<FolderOpen size={16} />} onClick={chooseRecordingsDirectory}>
{t("recording.recordingsFolder")}
</DropdownItem>
@@ -725,14 +747,6 @@ export function LaunchWindow() {
{microphoneEnabled ? <Mic size={18} /> : <MicOff size={18} />}
</IconButton>
- <IconButton
- onClick={() => setSystemAudioEnabled(!systemAudioEnabled)}
- title={systemAudioEnabled ? t("recording.disableSystemAudio") : t("recording.enableSystemAudio")}
- className={systemAudioEnabled ? styles.ibActive : ""}
- >
- {systemAudioEnabled ? <Volume2 size={18} /> : <VolumeX size={18} />}
- </IconButton>
-
<IconButton
onClick={toggleWebcam}
title={webcamEnabled ? t("recording.disableWebcam") : t("recording.enableWebcam")}
@@ -741,15 +755,6 @@ export function LaunchWindow() {
{webcamEnabled ? <Video size={18} /> : <VideoOff size={18} />}
</IconButton>
- {supportsHudCaptureProtection && (
- <IconButton
- onClick={() => void toggleHudCaptureProtection()}
- title={hideHudFromCapture ? t("recording.showHudInVideo") : t("recording.hideHudFromVideo")}
- >
- {hideHudFromCapture ? <EyeOff size={18} className="text-[#6b6b78]" /> : <Eye size={18} className="text-[#6360f5]" />}
- </IconButton>
- )}
-
<IconButton
onClick={() => toggleDropdown("countdown")}
title={t("recording.countdownDelay")}