fix overlay titlebar height mismatch (22→24px) so close button receives clicks, re-sync ratio on resize
This commit is contained in:
@@ -775,7 +775,7 @@ pub struct ExportResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const OVERLAY_BORDER_LOGICAL_PX: f64 = 4.0;
|
const OVERLAY_BORDER_LOGICAL_PX: f64 = 4.0;
|
||||||
const OVERLAY_TITLEBAR_LOGICAL_PX: f64 = 22.0;
|
const OVERLAY_TITLEBAR_LOGICAL_PX: f64 = 24.0;
|
||||||
|
|
||||||
|
|
||||||
fn start_overlay_clickthrough_poll(app: AppHandle, shutdown: Arc<AtomicBool>) {
|
fn start_overlay_clickthrough_poll(app: AppHandle, shutdown: Arc<AtomicBool>) {
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
win.onResized(async () => {
|
win.onResized(async () => {
|
||||||
if (enforcing) return
|
if (enforcing) return
|
||||||
await updateSize()
|
await updateSize()
|
||||||
|
// Re-sync ratio from Rust in case it changed (e.g. preset clicked)
|
||||||
|
await syncRatio()
|
||||||
if (lockedRatio === null) return
|
if (lockedRatio === null) return
|
||||||
// Small debounce to break the SetWindowPos → onResized loop
|
// Small debounce to break the SetWindowPos → onResized loop
|
||||||
if (resizeDebounce !== null) clearTimeout(resizeDebounce)
|
if (resizeDebounce !== null) clearTimeout(resizeDebounce)
|
||||||
|
|||||||
Reference in New Issue
Block a user