diff --git a/DONE.md b/DONE.md index 756d341..236fdf3 100644 --- a/DONE.md +++ b/DONE.md @@ -773,6 +773,7 @@ This file tracks completed features, fixes, and milestones. - ✅ Benchmark errors now show non-blocking notifications instead of OK popups - ✅ Fixed stats bar updates to run on the UI thread to avoid Fyne warnings - ✅ Defaulted Target Aspect Ratio back to Source unless user explicitly sets it +- ✅ Synced Target Aspect Ratio between Simple and Advanced menus - ✅ Stabilized video seeking and embedded rendering - ✅ Improved player window positioning - ✅ Fixed clear video functionality diff --git a/TODO.md b/TODO.md index 70f1054..035188e 100644 --- a/TODO.md +++ b/TODO.md @@ -47,6 +47,7 @@ This file tracks upcoming features, improvements, and known issues. - Non-blocking benchmark error notifications - Stats bar updates run on the UI thread - Target aspect default enforced as Source unless user changes it + - Target aspect sync across simple/advanced menus ## Priority Features for dev20+ diff --git a/main.go b/main.go index df4aba8..0914b42 100644 --- a/main.go +++ b/main.go @@ -5582,10 +5582,16 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject { transformHint.Wrapping = fyne.TextWrapWord aspectTargets := []string{"Source", "16:9", "4:3", "5:4", "5:3", "1:1", "9:16", "21:9"} - targetAspectSelect := widget.NewSelect(aspectTargets, func(value string) { - logging.Debug(logging.CatUI, "target aspect set to %s", value) - state.convert.OutputAspect = value - state.convert.AspectUserSet = true + var ( + targetAspectSelect *widget.Select + targetAspectSelectSimple *widget.Select + syncAspect func(string, bool) + syncingAspect bool + ) + targetAspectSelect = widget.NewSelect(aspectTargets, func(value string) { + if syncAspect != nil { + syncAspect(value, true) + } }) if state.convert.OutputAspect == "" { state.convert.OutputAspect = "Source" @@ -5624,11 +5630,7 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject { } } updateAspectBoxVisibility() - targetAspectSelect.OnChanged = func(value string) { - logging.Debug(logging.CatUI, "target aspect set to %s", value) - state.convert.OutputAspect = value - updateAspectBoxVisibility() - } + aspectOptions.OnChanged = func(value string) { logging.Debug(logging.CatUI, "aspect handling set to %s", value) state.convert.AspectHandling = value @@ -5988,17 +5990,42 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject { resolutionSelectSimple.SetSelected(state.convert.TargetResolution) // Simple aspect selector (separate widget) - targetAspectSelectSimple := widget.NewSelect(aspectTargets, func(value string) { - logging.Debug(logging.CatUI, "target aspect set to %s (simple)", value) - state.convert.OutputAspect = value - state.convert.AspectUserSet = true - updateAspectBoxVisibility() + targetAspectSelectSimple = widget.NewSelect(aspectTargets, func(value string) { + if syncAspect != nil { + syncAspect(value, true) + } }) if state.convert.OutputAspect == "" { state.convert.OutputAspect = "Source" } targetAspectSelectSimple.SetSelected(state.convert.OutputAspect) + syncAspect = func(value string, userSet bool) { + if syncingAspect { + return + } + if value == "" { + value = "Source" + } + syncingAspect = true + state.convert.OutputAspect = value + if userSet { + state.convert.AspectUserSet = true + } + if targetAspectSelectSimple != nil { + targetAspectSelectSimple.SetSelected(value) + } + if targetAspectSelect != nil { + targetAspectSelect.SetSelected(value) + } + if updateAspectBoxVisibility != nil { + updateAspectBoxVisibility() + } + logging.Debug(logging.CatUI, "target aspect set to %s", value) + syncingAspect = false + } + syncAspect(state.convert.OutputAspect, state.convert.AspectUserSet) + // Target File Size with smart presets + manual entry targetFileSizeEntry = widget.NewEntry() targetFileSizeEntry.SetPlaceHolder("e.g., 250")