Skip to content

armgit / Handy

Public Imported from GitHub
0

A free, open source, and extensible speech-to-text application that works completely offline.

tweak position on windows

CJ Pais62af7e8ed30b
diff --git a/src-tauri/src/overlay.rs b/src-tauri/src/overlay.rs
index f528c6ab..ca1b820e 100644
--- a/src-tauri/src/overlay.rs
+++ b/src-tauri/src/overlay.rs
@@ -5,9 +5,18 @@ use tauri::{AppHandle, Emitter, Manager, WebviewWindowBuilder};
const OVERLAY_WIDTH: f64 = 172.0;
const OVERLAY_HEIGHT: f64 = 36.0;
+
+#[cfg(target_os = "macos")]
const OVERLAY_TOP_OFFSET: f64 = 46.0;
+#[cfg(any(target_os = "windows", target_os = "linux"))]
+const OVERLAY_TOP_OFFSET: f64 = 4.0;
+
+#[cfg(target_os = "macos")]
const OVERLAY_BOTTOM_OFFSET: f64 = 15.0;
+#[cfg(any(target_os = "windows", target_os = "linux"))]
+const OVERLAY_BOTTOM_OFFSET: f64 = 40.0;
+
fn calculate_overlay_position(app_handle: &AppHandle) -> Option<(f64, f64)> {
if let Ok(monitors) = app_handle.primary_monitor() {
if let Some(monitor) = monitors {
diff --git a/src-tauri/src/utils.rs b/src-tauri/src/utils.rs
index 4f1d1772..2c6700e2 100644
--- a/src-tauri/src/utils.rs
+++ b/src-tauri/src/utils.rs
@@ -5,7 +5,7 @@ use std::sync::Arc;
use tauri::{AppHandle, Manager};
// Re-export all utility modules for easy access
-pub use crate::audio_feedback::*;
+// pub use crate::audio_feedback::*;
pub use crate::clipboard::*;
pub use crate::overlay::*;
pub use crate::tray::*;