Sync target aspect between simple and advanced
This commit is contained in:
parent
9af3ca0c1a
commit
406709bec6
1
DONE.md
1
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
|
- ✅ 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
|
- ✅ 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
|
- ✅ 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
|
- ✅ Stabilized video seeking and embedded rendering
|
||||||
- ✅ Improved player window positioning
|
- ✅ Improved player window positioning
|
||||||
- ✅ Fixed clear video functionality
|
- ✅ Fixed clear video functionality
|
||||||
|
|
|
||||||
1
TODO.md
1
TODO.md
|
|
@ -47,6 +47,7 @@ This file tracks upcoming features, improvements, and known issues.
|
||||||
- Non-blocking benchmark error notifications
|
- Non-blocking benchmark error notifications
|
||||||
- Stats bar updates run on the UI thread
|
- Stats bar updates run on the UI thread
|
||||||
- Target aspect default enforced as Source unless user changes it
|
- Target aspect default enforced as Source unless user changes it
|
||||||
|
- Target aspect sync across simple/advanced menus
|
||||||
|
|
||||||
## Priority Features for dev20+
|
## Priority Features for dev20+
|
||||||
|
|
||||||
|
|
|
||||||
55
main.go
55
main.go
|
|
@ -5582,10 +5582,16 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
transformHint.Wrapping = fyne.TextWrapWord
|
transformHint.Wrapping = fyne.TextWrapWord
|
||||||
|
|
||||||
aspectTargets := []string{"Source", "16:9", "4:3", "5:4", "5:3", "1:1", "9:16", "21:9"}
|
aspectTargets := []string{"Source", "16:9", "4:3", "5:4", "5:3", "1:1", "9:16", "21:9"}
|
||||||
targetAspectSelect := widget.NewSelect(aspectTargets, func(value string) {
|
var (
|
||||||
logging.Debug(logging.CatUI, "target aspect set to %s", value)
|
targetAspectSelect *widget.Select
|
||||||
state.convert.OutputAspect = value
|
targetAspectSelectSimple *widget.Select
|
||||||
state.convert.AspectUserSet = true
|
syncAspect func(string, bool)
|
||||||
|
syncingAspect bool
|
||||||
|
)
|
||||||
|
targetAspectSelect = widget.NewSelect(aspectTargets, func(value string) {
|
||||||
|
if syncAspect != nil {
|
||||||
|
syncAspect(value, true)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
if state.convert.OutputAspect == "" {
|
if state.convert.OutputAspect == "" {
|
||||||
state.convert.OutputAspect = "Source"
|
state.convert.OutputAspect = "Source"
|
||||||
|
|
@ -5624,11 +5630,7 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateAspectBoxVisibility()
|
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) {
|
aspectOptions.OnChanged = func(value string) {
|
||||||
logging.Debug(logging.CatUI, "aspect handling set to %s", value)
|
logging.Debug(logging.CatUI, "aspect handling set to %s", value)
|
||||||
state.convert.AspectHandling = value
|
state.convert.AspectHandling = value
|
||||||
|
|
@ -5988,17 +5990,42 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
resolutionSelectSimple.SetSelected(state.convert.TargetResolution)
|
resolutionSelectSimple.SetSelected(state.convert.TargetResolution)
|
||||||
|
|
||||||
// Simple aspect selector (separate widget)
|
// Simple aspect selector (separate widget)
|
||||||
targetAspectSelectSimple := widget.NewSelect(aspectTargets, func(value string) {
|
targetAspectSelectSimple = widget.NewSelect(aspectTargets, func(value string) {
|
||||||
logging.Debug(logging.CatUI, "target aspect set to %s (simple)", value)
|
if syncAspect != nil {
|
||||||
state.convert.OutputAspect = value
|
syncAspect(value, true)
|
||||||
state.convert.AspectUserSet = true
|
}
|
||||||
updateAspectBoxVisibility()
|
|
||||||
})
|
})
|
||||||
if state.convert.OutputAspect == "" {
|
if state.convert.OutputAspect == "" {
|
||||||
state.convert.OutputAspect = "Source"
|
state.convert.OutputAspect = "Source"
|
||||||
}
|
}
|
||||||
targetAspectSelectSimple.SetSelected(state.convert.OutputAspect)
|
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
|
// Target File Size with smart presets + manual entry
|
||||||
targetFileSizeEntry = widget.NewEntry()
|
targetFileSizeEntry = widget.NewEntry()
|
||||||
targetFileSizeEntry.SetPlaceHolder("e.g., 250")
|
targetFileSizeEntry.SetPlaceHolder("e.g., 250")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user