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

This commit is contained in:
Anton Sotkov 2026-02-09 08:35:08 +02:00 committed by GitHub
parent 4c9c200709
commit a9024d07bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 8 deletions

9
src-tauri/Cargo.lock generated
View file

@ -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",

View file

@ -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"

View file

@ -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
}
};