Skip to content

armgit / Handy

Public Imported from GitHub
0

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

fix: bottom overlay positioned partially off-screen (#543)

Anton Sotkova9024d07bcfe
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index db36fedc..d18b4c96 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -6581,8 +6581,7 @@ dependencies = [
[[package]]
name = "tauri-runtime"
version = "2.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9368f09358496f2229313fccb37682ad116b7f46fa76981efe116994a0628926"
+source = "git+https://github.com/cjpais/tauri.git?branch=handy-2.9.1#8ba98c7b543ec155961e1840641b1f28c548b8dd"
dependencies = [
"cookie",
"dpi",
@@ -6606,8 +6605,7 @@ dependencies = [
[[package]]
name = "tauri-runtime-wry"
version = "2.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "929f5df216f5c02a9e894554401bcdab6eec3e39ec6a4a7731c7067fc8688a93"
+source = "git+https://github.com/cjpais/tauri.git?branch=handy-2.9.1#8ba98c7b543ec155961e1840641b1f28c548b8dd"
dependencies = [
"gtk",
"http",
@@ -6661,8 +6659,7 @@ dependencies = [
[[package]]
name = "tauri-utils"
version = "2.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6b8bbe426abdbf52d050e52ed693130dbd68375b9ad82a3fb17efb4c8d85673"
+source = "git+https://github.com/cjpais/tauri.git?branch=handy-2.9.1#8ba98c7b543ec155961e1840641b1f28c548b8dd"
dependencies = [
"anyhow",
"brotli",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 10742456..68de705c 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -101,6 +101,11 @@ tauri-nspanel = { git = "https://github.com/ahkohd/tauri-nspanel", branch = "v2.
gtk-layer-shell = { version = "0.8", features = ["v0_6"] }
gtk = "0.18"
+[patch.crates-io]
+tauri-runtime = { git = "https://github.com/cjpais/tauri.git", branch = "handy-2.9.1" }
+tauri-runtime-wry = { git = "https://github.com/cjpais/tauri.git", branch = "handy-2.9.1" }
+tauri-utils = { git = "https://github.com/cjpais/tauri.git", branch = "handy-2.9.1" }
+
[dev-dependencies]
tempfile = "3"
diff --git a/src-tauri/src/overlay.rs b/src-tauri/src/overlay.rs
index b08f650a..c6517ad5 100644
--- a/src-tauri/src/overlay.rs
+++ b/src-tauri/src/overlay.rs
@@ -168,8 +168,7 @@ fn calculate_overlay_position(app_handle: &AppHandle) -> Option<(f64, f64)> {
let y = match settings.overlay_position {
OverlayPosition::Top => work_area_y + OVERLAY_TOP_OFFSET,
OverlayPosition::Bottom | OverlayPosition::None => {
- // don't subtract the overlay height it puts it too far up
- work_area_y + work_area_height - OVERLAY_BOTTOM_OFFSET
+ work_area_y + work_area_height - OVERLAY_HEIGHT - OVERLAY_BOTTOM_OFFSET
}
};