diff --git a/src/hooks/useSettings.ts b/src/hooks/useSettings.ts
index 2223ba8..17588bc 100644
--- a/src/hooks/useSettings.ts
+++ b/src/hooks/useSettings.ts
@@ -199,8 +199,8 @@ export const useSettings = (): UseSettingsReturn => {
language: value,
});
break;
- case "show_overlay":
- await invoke("change_show_overlay_setting", { enabled: value });
+ case "overlay_position":
+ await invoke("change_overlay_position_setting", { position: value });
break;
case "debug_mode":
await invoke("change_debug_mode_setting", { enabled: value });
@@ -249,7 +249,7 @@ export const useSettings = (): UseSettingsReturn => {
selected_output_device: "Default",
translate_to_english: false,
selected_language: "auto",
- show_overlay: true,
+ overlay_position: "bottom",
debug_mode: false,
};
diff --git a/src/lib/types.ts b/src/lib/types.ts
index 5ac069c..dfec7b3 100644
--- a/src/lib/types.ts
+++ b/src/lib/types.ts
@@ -19,6 +19,9 @@ export const AudioDeviceSchema = z.object({
is_default: z.boolean(),
});
+export const OverlayPositionSchema = z.enum(["none", "top", "bottom"]);
+export type OverlayPosition = z.infer
;
+
export const SettingsSchema = z.object({
bindings: ShortcutBindingsMapSchema,
push_to_talk: z.boolean(),
@@ -29,7 +32,7 @@ export const SettingsSchema = z.object({
selected_output_device: z.string().nullable().optional(),
translate_to_english: z.boolean(),
selected_language: z.string(),
- show_overlay: z.boolean(),
+ overlay_position: OverlayPositionSchema,
debug_mode: z.boolean(),
});
diff --git a/src/overlay/RecordingOverlay.css b/src/overlay/RecordingOverlay.css
index fb3c72f..0ea8c90 100644
--- a/src/overlay/RecordingOverlay.css
+++ b/src/overlay/RecordingOverlay.css
@@ -1,15 +1,15 @@
.recording-overlay {
- height: 40px;
- width: 160px;
+ height: 36px;
+ width: 172px;
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
- padding-left: 6px;
- padding-right: 6px;
- background: rgba(0, 0, 0, 0.6);
- border-radius: 24px;
+ padding: 6px;
+ background: #000000cc;
+ border-radius: 18px;
opacity: 0;
transition: opacity 300ms ease-out;
+ box-sizing: border-box;
}
.overlay-left {
@@ -35,14 +35,15 @@
justify-content: center;
gap: 3px;
padding-bottom: 0px;
- height: 28px;
+ height: 24px;
+ overflow: hidden;
}
.bar {
width: 6px;
- background: linear-gradient(to top, #faa2ca, #f28cbb);
- max-height: 28px;
- border-radius: 4px;
+ background: #FFE5EE;
+ max-height: 20px;
+ border-radius: 2px;
transition: height 80ms linear;
min-height: 4px;
}
@@ -52,9 +53,8 @@
}
.transcribing-text {
- color: #faa2ca;
- font-size: 14px;
- font-weight: 600;
+ color: white;
+ font-size: 12px;
font-family:
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
animation: transcribing-pulse 1.5s infinite ease-in-out;
@@ -71,10 +71,10 @@
}
.cancel-button {
- width: 28px;
- height: 28px;
+ width: 24px;
+ height: 24px;
border-radius: 50%;
- background: #e53e3e;
+ background: transparent;
display: flex;
align-items: center;
justify-content: center;
@@ -86,7 +86,7 @@
}
.cancel-button:hover {
- background: #c53030;
+ background: #FAA2CA33;
transform: scale(1.05);
}
diff --git a/src/overlay/RecordingOverlay.tsx b/src/overlay/RecordingOverlay.tsx
index 6995f74..16fc4b9 100644
--- a/src/overlay/RecordingOverlay.tsx
+++ b/src/overlay/RecordingOverlay.tsx
@@ -1,7 +1,12 @@
-import React, { useEffect, useState, useRef } from "react";
-import "./RecordingOverlay.css";
-import { listen } from "@tauri-apps/api/event";
import { invoke } from "@tauri-apps/api/core";
+import { listen } from "@tauri-apps/api/event";
+import React, { useEffect, useRef, useState } from "react";
+import {
+ MicrophoneIcon,
+ TranscriptionIcon,
+ CancelIcon,
+} from "../components/icons";
+import "./RecordingOverlay.css";
type OverlayState = "recording" | "transcribing";
@@ -51,27 +56,17 @@ const RecordingOverlay: React.FC = () => {
setupEventListeners();
}, []);
- const getIconPath = () => {
- return state === "recording"
- ? "/icon/recording.png"
- : "/icon/transcribing.png";
- };
-
- const getIconAlt = () => {
- return state === "recording" ? "Recording Icon" : "Transcribing Icon";
+ const getIcon = () => {
+ if (state === "recording") {
+ return ;
+ } else {
+ return ;
+ }
};
return (
-
-
})
-
+
{getIcon()}
{state === "recording" && (
@@ -81,7 +76,7 @@ const RecordingOverlay: React.FC = () => {
key={i}
className="bar"
style={{
- height: `${4 + Math.pow(v, 0.7) * 32}px`, // Slight curve for better visual
+ height: `${Math.min(20, 4 + Math.pow(v, 0.7) * 16)}px`, // Cap at 20px max height
transition: "height 60ms ease-out",
opacity: Math.max(0.4, v * 1.7), // Minimum opacity for visibility
}}
@@ -102,15 +97,7 @@ const RecordingOverlay: React.FC = () => {
invoke("cancel_operation");
}}
>
-
+
)}
diff --git a/src/overlay/index.html b/src/overlay/index.html
index 08db593..ef2c670 100644
--- a/src/overlay/index.html
+++ b/src/overlay/index.html
@@ -9,6 +9,14 @@
margin: 0;
padding: 0;
background: transparent;
+ overflow: hidden;
+ width: 100%;
+ height: 100%;
+ }
+ #root {
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
}