gif encode retry loop (up to 5 passes, adjusts resolution/fps until within 15% of target size), aspect ratio enforcement via rust command instead of unreliable cross-window emit
This commit is contained in:
+2
-2
@@ -440,14 +440,14 @@
|
||||
{#each PRESETS as [w, h, label]}
|
||||
<button class="chip" onclick={() => {
|
||||
aspectLock = w / h
|
||||
emit("overlay-aspect-lock", { ratio: aspectLock })
|
||||
api.setOverlayAspect(aspectLock)
|
||||
api.setOverlaySize(w, h)
|
||||
}}>{label}</button>
|
||||
{/each}
|
||||
{#if aspectLock !== null}
|
||||
<button class="chip unlock" onclick={() => {
|
||||
aspectLock = null
|
||||
emit("overlay-aspect-lock", { ratio: null })
|
||||
api.setOverlayAspect(null)
|
||||
}}>Unlock</button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -161,6 +161,8 @@ export const api = {
|
||||
hideOverlay: () => invoke<void>("hide_overlay"),
|
||||
setOverlaySize: (width: number, height: number) =>
|
||||
invoke<void>("set_overlay_size", { width, height }),
|
||||
setOverlayAspect: (ratio: number | null) =>
|
||||
invoke<void>("set_overlay_aspect", { ratio }),
|
||||
setOverlayToWindow: (x: number, y: number, width: number, height: number) =>
|
||||
invoke<void>("set_overlay_to_window", { x, y, width, height }),
|
||||
listWindows: () => invoke<WindowInfo[]>("list_windows"),
|
||||
|
||||
Reference in New Issue
Block a user