quality pass 2: cached encoders, cancel in gif retry, overlay CSS split
- debug logging in picker changed to tracing::debug - show_overlay uses visible_window_bounds helper - encode_gif retry loop checks cancel flag between attempts - list_encoders cached via OnceLock (ffmpeg -encoders runs once) - remove unnecessary GifBudgetMode clone (is Copy) - config test uses unique temp dir per process - click highlights use 2px border instead of solid fill - audio capture_loop polls at 5ms instead of 1ms - overlay window loads minimal overlay.css instead of full app.css - remove non-spec 960x540 preset - Settings dirty detection uses field-by-field comparison - Overlay startDragging catches errors - pauseRec only emits recording-state on success - Picker listener cleanup guards against unmount race - add sync notes for previewDims and sr-only trim inputs
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
let hover: Rect | null = $state(null)
|
||||
let originX = 0, originY = 0, scale = 1
|
||||
let mounted = true
|
||||
|
||||
onMount(() => {
|
||||
const win = getCurrentWebviewWindow()
|
||||
@@ -20,11 +21,14 @@
|
||||
|
||||
void (async () => {
|
||||
await refresh()
|
||||
unlisten.push(await win.onMoved(refresh))
|
||||
unlisten.push(await listen<Rect>("picker-hover", (e) => { hover = e.payload }))
|
||||
win.onMoved(refresh).then(fn => { if (mounted) unlisten.push(fn) })
|
||||
listen<Rect>("picker-hover", (e) => { hover = e.payload }).then(fn => { if (mounted) unlisten.push(fn) })
|
||||
})()
|
||||
|
||||
return () => unlisten.forEach(fn => fn())
|
||||
return () => {
|
||||
mounted = false
|
||||
unlisten.forEach(fn => fn())
|
||||
}
|
||||
})
|
||||
|
||||
let rectStyle = $derived.by(() => {
|
||||
|
||||
Reference in New Issue
Block a user