Add subtitles module placeholder and benchmark UI flag

This commit is contained in:
Stu Leak 2025-12-20 14:03:14 -05:00
parent 54c50e7336
commit a04c51a16b
2 changed files with 13 additions and 2 deletions

View File

@ -44,6 +44,12 @@ func HandleAudio(files []string) {
fmt.Println("audio", files) fmt.Println("audio", files)
} }
// HandleSubtitles handles the subtitles module (placeholder)
func HandleSubtitles(files []string) {
logging.Debug(logging.CatModule, "subtitles handler invoked with %v", files)
fmt.Println("subtitles", files)
}
// HandleThumb handles the thumb module // HandleThumb handles the thumb module
func HandleThumb(files []string) { func HandleThumb(files []string) {
logging.Debug(logging.CatModule, "thumb handler invoked with %v", files) logging.Debug(logging.CatModule, "thumb handler invoked with %v", files)

View File

@ -44,7 +44,7 @@ type HistoryEntry struct {
} }
// BuildMainMenu creates the main menu view with module tiles grouped by category // BuildMainMenu creates the main menu view with module tiles grouped by category
func BuildMainMenu(modules []ModuleInfo, onModuleClick func(string), onModuleDrop func(string, []fyne.URI), onQueueClick func(), onLogsClick func(), onBenchmarkClick func(), onBenchmarkHistoryClick func(), onToggleSidebar func(), sidebarVisible bool, sidebar fyne.CanvasObject, titleColor, queueColor, textColor color.Color, queueCompleted, queueTotal int) fyne.CanvasObject { func BuildMainMenu(modules []ModuleInfo, onModuleClick func(string), onModuleDrop func(string, []fyne.URI), onQueueClick func(), onLogsClick func(), onBenchmarkClick func(), onBenchmarkHistoryClick func(), onToggleSidebar func(), sidebarVisible bool, sidebar fyne.CanvasObject, titleColor, queueColor, textColor color.Color, queueCompleted, queueTotal int, hasBenchmark bool) fyne.CanvasObject {
title := canvas.NewText("VIDEOTOOLS", titleColor) title := canvas.NewText("VIDEOTOOLS", titleColor)
title.TextStyle = fyne.TextStyle{Monospace: true, Bold: true} title.TextStyle = fyne.TextStyle{Monospace: true, Bold: true}
title.TextSize = 28 title.TextSize = 28
@ -55,7 +55,12 @@ func BuildMainMenu(modules []ModuleInfo, onModuleClick func(string), onModuleDro
sidebarToggleBtn.Importance = widget.LowImportance sidebarToggleBtn.Importance = widget.LowImportance
benchmarkBtn := widget.NewButton("Run Benchmark", onBenchmarkClick) benchmarkBtn := widget.NewButton("Run Benchmark", onBenchmarkClick)
benchmarkBtn.Importance = widget.LowImportance // Highlight the benchmark button if no benchmark has been run
if !hasBenchmark {
benchmarkBtn.Importance = widget.HighImportance
} else {
benchmarkBtn.Importance = widget.LowImportance
}
viewResultsBtn := widget.NewButton("View Results", onBenchmarkHistoryClick) viewResultsBtn := widget.NewButton("View Results", onBenchmarkHistoryClick)
viewResultsBtn.Importance = widget.LowImportance viewResultsBtn.Importance = widget.LowImportance