feat: complete Convert module colored dropdowns (batch 2)
This batch completes all remaining dropdowns in the Convert module. Every dropdown now has vibrant color coding for faster visual navigation. Convert Module - Replaced: - Rotation select (0°/90°/180°/270°) - rainbow colors - Target aspect selects (×2: simple & advanced) - rainbow colors - Resolution selects (×2: simple & advanced) - rainbow colors - Encoder preset selects (×2: simple & advanced) - quality gradient (veryslow=blue/high quality → ultrafast=red/low quality) - Frame rate select - rainbow colors - Pixel format select - semantic pixel format colors - Hardware acceleration select - rainbow colors - Audio bitrate select - rainbow colors - Audio channels select - rainbow colors All Convert module dropdowns now use ColoredSelect ✅ Build status: ✅ Successful
This commit is contained in:
parent
24c17ff61d
commit
384dffd8e5
77
main.go
77
main.go
|
|
@ -6905,7 +6905,9 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
})
|
})
|
||||||
flipVerticalCheck.Checked = state.convert.FlipVertical
|
flipVerticalCheck.Checked = state.convert.FlipVertical
|
||||||
|
|
||||||
rotationSelect := widget.NewSelect([]string{"0°", "90° CW", "180°", "270° CW"}, func(value string) {
|
rotationOptions := []string{"0°", "90° CW", "180°", "270° CW"}
|
||||||
|
rotationColors := ui.BuildGenericColorMap(rotationOptions)
|
||||||
|
rotationSelect := ui.NewColoredSelect(rotationOptions, rotationColors, func(value string) {
|
||||||
var rotation string
|
var rotation string
|
||||||
switch value {
|
switch value {
|
||||||
case "0°":
|
case "0°":
|
||||||
|
|
@ -6919,7 +6921,7 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
}
|
}
|
||||||
state.convert.Rotation = rotation
|
state.convert.Rotation = rotation
|
||||||
logging.Debug(logging.CatUI, "rotation set to %s", rotation)
|
logging.Debug(logging.CatUI, "rotation set to %s", rotation)
|
||||||
})
|
}, state.window)
|
||||||
if state.convert.Rotation == "" {
|
if state.convert.Rotation == "" {
|
||||||
state.convert.Rotation = "0"
|
state.convert.Rotation = "0"
|
||||||
}
|
}
|
||||||
|
|
@ -6935,16 +6937,17 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
|
|
||||||
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"}
|
||||||
var (
|
var (
|
||||||
targetAspectSelect *widget.Select
|
targetAspectSelect *ui.ColoredSelect
|
||||||
targetAspectSelectSimple *widget.Select
|
targetAspectSelectSimple *ui.ColoredSelect
|
||||||
syncAspect func(string, bool)
|
syncAspect func(string, bool)
|
||||||
syncingAspect bool
|
syncingAspect bool
|
||||||
)
|
)
|
||||||
targetAspectSelect = widget.NewSelect(aspectTargets, func(value string) {
|
aspectColors := ui.BuildGenericColorMap(aspectTargets)
|
||||||
|
targetAspectSelect = ui.NewColoredSelect(aspectTargets, aspectColors, func(value string) {
|
||||||
if syncAspect != nil {
|
if syncAspect != nil {
|
||||||
syncAspect(value, true)
|
syncAspect(value, true)
|
||||||
}
|
}
|
||||||
})
|
}, state.window)
|
||||||
if state.convert.OutputAspect == "" {
|
if state.convert.OutputAspect == "" {
|
||||||
state.convert.OutputAspect = "Source"
|
state.convert.OutputAspect = "Source"
|
||||||
}
|
}
|
||||||
|
|
@ -7136,26 +7139,28 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
encoderPresetHint.SetText(hint)
|
encoderPresetHint.SetText(hint)
|
||||||
}
|
}
|
||||||
|
|
||||||
encoderPresetSelect := widget.NewSelect([]string{"veryslow", "slower", "slow", "medium", "fast", "faster", "veryfast", "superfast", "ultrafast"}, func(value string) {
|
encoderPresetOptions := []string{"veryslow", "slower", "slow", "medium", "fast", "faster", "veryfast", "superfast", "ultrafast"}
|
||||||
|
encoderPresetColors := ui.BuildQualityColorMap(encoderPresetOptions)
|
||||||
|
encoderPresetSelect := ui.NewColoredSelect(encoderPresetOptions, encoderPresetColors, func(value string) {
|
||||||
state.convert.EncoderPreset = value
|
state.convert.EncoderPreset = value
|
||||||
logging.Debug(logging.CatUI, "encoder preset set to %s", value)
|
logging.Debug(logging.CatUI, "encoder preset set to %s", value)
|
||||||
updateEncoderPresetHint(value)
|
updateEncoderPresetHint(value)
|
||||||
if buildCommandPreview != nil {
|
if buildCommandPreview != nil {
|
||||||
buildCommandPreview()
|
buildCommandPreview()
|
||||||
}
|
}
|
||||||
})
|
}, state.window)
|
||||||
encoderPresetSelect.SetSelected(state.convert.EncoderPreset)
|
encoderPresetSelect.SetSelected(state.convert.EncoderPreset)
|
||||||
updateEncoderPresetHint(state.convert.EncoderPreset)
|
updateEncoderPresetHint(state.convert.EncoderPreset)
|
||||||
|
|
||||||
// Simple mode preset dropdown
|
// Simple mode preset dropdown
|
||||||
simplePresetSelect := widget.NewSelect([]string{"veryslow", "slower", "slow", "medium", "fast", "faster", "veryfast", "superfast", "ultrafast"}, func(value string) {
|
simplePresetSelect := ui.NewColoredSelect(encoderPresetOptions, encoderPresetColors, func(value string) {
|
||||||
state.convert.EncoderPreset = value
|
state.convert.EncoderPreset = value
|
||||||
logging.Debug(logging.CatUI, "simple preset set to %s", value)
|
logging.Debug(logging.CatUI, "simple preset set to %s", value)
|
||||||
updateEncoderPresetHint(value)
|
updateEncoderPresetHint(value)
|
||||||
if buildCommandPreview != nil {
|
if buildCommandPreview != nil {
|
||||||
buildCommandPreview()
|
buildCommandPreview()
|
||||||
}
|
}
|
||||||
})
|
}, state.window)
|
||||||
simplePresetSelect.SetSelected(state.convert.EncoderPreset)
|
simplePresetSelect.SetSelected(state.convert.EncoderPreset)
|
||||||
|
|
||||||
// Settings management for batch operations
|
// Settings management for batch operations
|
||||||
|
|
@ -7613,22 +7618,24 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
)
|
)
|
||||||
|
|
||||||
// Simple resolution selector (separate widget to avoid double-parent issues)
|
// Simple resolution selector (separate widget to avoid double-parent issues)
|
||||||
resolutionSelectSimple := widget.NewSelect([]string{
|
resolutionOptionsSimple := []string{
|
||||||
"Source", "360p", "480p", "540p", "720p", "1080p", "1440p", "4K", "8K",
|
"Source", "360p", "480p", "540p", "720p", "1080p", "1440p", "4K", "8K",
|
||||||
"2X (relative)", "4X (relative)",
|
"2X (relative)", "4X (relative)",
|
||||||
"NTSC (720×480)", "PAL (720×540)", "PAL (720×576)",
|
"NTSC (720×480)", "PAL (720×540)", "PAL (720×576)",
|
||||||
}, func(value string) {
|
}
|
||||||
|
resolutionColorsSimple := ui.BuildGenericColorMap(resolutionOptionsSimple)
|
||||||
|
resolutionSelectSimple := ui.NewColoredSelect(resolutionOptionsSimple, resolutionColorsSimple, func(value string) {
|
||||||
state.convert.TargetResolution = value
|
state.convert.TargetResolution = value
|
||||||
logging.Debug(logging.CatUI, "target resolution set to %s (simple)", value)
|
logging.Debug(logging.CatUI, "target resolution set to %s (simple)", value)
|
||||||
})
|
}, state.window)
|
||||||
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 = ui.NewColoredSelect(aspectTargets, aspectColors, func(value string) {
|
||||||
if syncAspect != nil {
|
if syncAspect != nil {
|
||||||
syncAspect(value, true)
|
syncAspect(value, true)
|
||||||
}
|
}
|
||||||
})
|
}, state.window)
|
||||||
if state.convert.OutputAspect == "" {
|
if state.convert.OutputAspect == "" {
|
||||||
state.convert.OutputAspect = "Source"
|
state.convert.OutputAspect = "Source"
|
||||||
}
|
}
|
||||||
|
|
@ -7989,14 +7996,16 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
updateEncodingControls()
|
updateEncodingControls()
|
||||||
|
|
||||||
// Target Resolution (advanced)
|
// Target Resolution (advanced)
|
||||||
resolutionSelect := widget.NewSelect([]string{
|
resolutionOptions := []string{
|
||||||
"Source", "720p", "1080p", "1440p", "4K", "8K",
|
"Source", "720p", "1080p", "1440p", "4K", "8K",
|
||||||
"2X (relative)", "4X (relative)",
|
"2X (relative)", "4X (relative)",
|
||||||
"NTSC (720×480)", "PAL (720×540)", "PAL (720×576)",
|
"NTSC (720×480)", "PAL (720×540)", "PAL (720×576)",
|
||||||
}, func(value string) {
|
}
|
||||||
|
resolutionColors := ui.BuildGenericColorMap(resolutionOptions)
|
||||||
|
resolutionSelect := ui.NewColoredSelect(resolutionOptions, resolutionColors, func(value string) {
|
||||||
state.convert.TargetResolution = value
|
state.convert.TargetResolution = value
|
||||||
logging.Debug(logging.CatUI, "target resolution set to %s", value)
|
logging.Debug(logging.CatUI, "target resolution set to %s", value)
|
||||||
})
|
}, state.window)
|
||||||
if state.convert.TargetResolution == "" {
|
if state.convert.TargetResolution == "" {
|
||||||
state.convert.TargetResolution = "Source"
|
state.convert.TargetResolution = "Source"
|
||||||
}
|
}
|
||||||
|
|
@ -8064,11 +8073,13 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
frameRateSelect := widget.NewSelect([]string{"Source", "23.976", "24", "25", "29.97", "30", "50", "59.94", "60"}, func(value string) {
|
frameRateOptions := []string{"Source", "23.976", "24", "25", "29.97", "30", "50", "59.94", "60"}
|
||||||
|
frameRateColors := ui.BuildGenericColorMap(frameRateOptions)
|
||||||
|
frameRateSelect := ui.NewColoredSelect(frameRateOptions, frameRateColors, func(value string) {
|
||||||
state.convert.FrameRate = value
|
state.convert.FrameRate = value
|
||||||
logging.Debug(logging.CatUI, "frame rate set to %s", value)
|
logging.Debug(logging.CatUI, "frame rate set to %s", value)
|
||||||
updateFrameRateHint()
|
updateFrameRateHint()
|
||||||
})
|
}, state.window)
|
||||||
frameRateSelect.SetSelected(state.convert.FrameRate)
|
frameRateSelect.SetSelected(state.convert.FrameRate)
|
||||||
updateFrameRateHint()
|
updateFrameRateHint()
|
||||||
|
|
||||||
|
|
@ -8080,10 +8091,12 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
motionInterpCheck.Checked = state.convert.UseMotionInterpolation
|
motionInterpCheck.Checked = state.convert.UseMotionInterpolation
|
||||||
|
|
||||||
// Pixel Format
|
// Pixel Format
|
||||||
pixelFormatSelect := widget.NewSelect([]string{"yuv420p", "yuv422p", "yuv444p"}, func(value string) {
|
pixelFormatOptions := []string{"yuv420p", "yuv422p", "yuv444p"}
|
||||||
|
pixelFormatColors := ui.BuildPixelFormatColorMap(pixelFormatOptions)
|
||||||
|
pixelFormatSelect := ui.NewColoredSelect(pixelFormatOptions, pixelFormatColors, func(value string) {
|
||||||
state.convert.PixelFormat = value
|
state.convert.PixelFormat = value
|
||||||
logging.Debug(logging.CatUI, "pixel format set to %s", value)
|
logging.Debug(logging.CatUI, "pixel format set to %s", value)
|
||||||
})
|
}, state.window)
|
||||||
pixelFormatSelect.SetSelected(state.convert.PixelFormat)
|
pixelFormatSelect.SetSelected(state.convert.PixelFormat)
|
||||||
|
|
||||||
// Hardware Acceleration with hint
|
// Hardware Acceleration with hint
|
||||||
|
|
@ -8091,10 +8104,12 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
hwAccelHint.Wrapping = fyne.TextWrapWord
|
hwAccelHint.Wrapping = fyne.TextWrapWord
|
||||||
// Wrap hint in padded container to ensure proper text wrapping in narrow windows
|
// Wrap hint in padded container to ensure proper text wrapping in narrow windows
|
||||||
hwAccelHintContainer := container.NewPadded(hwAccelHint)
|
hwAccelHintContainer := container.NewPadded(hwAccelHint)
|
||||||
hwAccelSelect := widget.NewSelect([]string{"auto", "none", "nvenc", "amf", "vaapi", "qsv", "videotoolbox"}, func(value string) {
|
hwAccelOptions := []string{"auto", "none", "nvenc", "amf", "vaapi", "qsv", "videotoolbox"}
|
||||||
|
hwAccelColors := ui.BuildGenericColorMap(hwAccelOptions)
|
||||||
|
hwAccelSelect := ui.NewColoredSelect(hwAccelOptions, hwAccelColors, func(value string) {
|
||||||
state.convert.HardwareAccel = value
|
state.convert.HardwareAccel = value
|
||||||
logging.Debug(logging.CatUI, "hardware accel set to %s", value)
|
logging.Debug(logging.CatUI, "hardware accel set to %s", value)
|
||||||
})
|
}, state.window)
|
||||||
if state.convert.HardwareAccel == "" {
|
if state.convert.HardwareAccel == "" {
|
||||||
state.convert.HardwareAccel = "auto"
|
state.convert.HardwareAccel = "auto"
|
||||||
}
|
}
|
||||||
|
|
@ -8117,14 +8132,16 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
audioCodecContainer := audioCodecSelect // Use the widget directly instead of wrapping
|
audioCodecContainer := audioCodecSelect // Use the widget directly instead of wrapping
|
||||||
|
|
||||||
// Audio Bitrate
|
// Audio Bitrate
|
||||||
audioBitrateSelect := widget.NewSelect([]string{"128k", "192k", "256k", "320k"}, func(value string) {
|
audioBitrateOptions := []string{"128k", "192k", "256k", "320k"}
|
||||||
|
audioBitrateColors := ui.BuildGenericColorMap(audioBitrateOptions)
|
||||||
|
audioBitrateSelect := ui.NewColoredSelect(audioBitrateOptions, audioBitrateColors, func(value string) {
|
||||||
state.convert.AudioBitrate = value
|
state.convert.AudioBitrate = value
|
||||||
logging.Debug(logging.CatUI, "audio bitrate set to %s", value)
|
logging.Debug(logging.CatUI, "audio bitrate set to %s", value)
|
||||||
})
|
}, state.window)
|
||||||
audioBitrateSelect.SetSelected(state.convert.AudioBitrate)
|
audioBitrateSelect.SetSelected(state.convert.AudioBitrate)
|
||||||
|
|
||||||
// Audio Channels
|
// Audio Channels
|
||||||
audioChannelsSelect := widget.NewSelect([]string{
|
audioChannelsOptions := []string{
|
||||||
"Source",
|
"Source",
|
||||||
"Mono",
|
"Mono",
|
||||||
"Stereo",
|
"Stereo",
|
||||||
|
|
@ -8133,10 +8150,12 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
"Right to Stereo",
|
"Right to Stereo",
|
||||||
"Mix to Stereo",
|
"Mix to Stereo",
|
||||||
"Swap L/R",
|
"Swap L/R",
|
||||||
}, func(value string) {
|
}
|
||||||
|
audioChannelsColors := ui.BuildGenericColorMap(audioChannelsOptions)
|
||||||
|
audioChannelsSelect := ui.NewColoredSelect(audioChannelsOptions, audioChannelsColors, func(value string) {
|
||||||
state.convert.AudioChannels = value
|
state.convert.AudioChannels = value
|
||||||
logging.Debug(logging.CatUI, "audio channels set to %s", value)
|
logging.Debug(logging.CatUI, "audio channels set to %s", value)
|
||||||
})
|
}, state.window)
|
||||||
audioChannelsSelect.SetSelected(state.convert.AudioChannels)
|
audioChannelsSelect.SetSelected(state.convert.AudioChannels)
|
||||||
|
|
||||||
// Now define updateDVDOptions with access to resolution and framerate selects
|
// Now define updateDVDOptions with access to resolution and framerate selects
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user