Hide benchmark indicator in Convert module when already applied
User feedback: Don't show benchmark status clutter when settings are already applied. Changes: - Only show benchmark indicator when settings are NOT applied - Removes 'Benchmark: Applied' text + button from UI when active - Cleaner Convert module interface when using benchmark settings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b6c09bf9b3
commit
8ce6240c02
37
main.go
37
main.go
|
|
@ -6297,30 +6297,25 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
state.convert.EncoderPreset == preset &&
|
state.convert.EncoderPreset == preset &&
|
||||||
state.convert.HardwareAccel == benchHW
|
state.convert.HardwareAccel == benchHW
|
||||||
|
|
||||||
statusColor := utils.MustHex("#FFC857")
|
// Only show benchmark indicator if settings are NOT already applied
|
||||||
statusText := "Benchmark: Not Applied"
|
if !applied {
|
||||||
if applied {
|
statusColor := utils.MustHex("#FFC857")
|
||||||
statusColor = utils.MustHex("#4CE870")
|
statusText := "Benchmark: Not Applied"
|
||||||
statusText = "Benchmark: Applied"
|
benchmarkStatus = canvas.NewText(statusText, statusColor)
|
||||||
}
|
benchmarkStatus.TextStyle = fyne.TextStyle{Monospace: true, Bold: true}
|
||||||
benchmarkStatus = canvas.NewText(statusText, statusColor)
|
benchmarkStatus.TextSize = 12
|
||||||
benchmarkStatus.TextStyle = fyne.TextStyle{Monospace: true, Bold: true}
|
|
||||||
benchmarkStatus.TextSize = 12
|
|
||||||
|
|
||||||
benchmarkApplyBtn = widget.NewButton("Apply Benchmark", func() {
|
benchmarkApplyBtn = widget.NewButton("Apply Benchmark", func() {
|
||||||
state.applyBenchmarkRecommendation(encoder, preset)
|
state.applyBenchmarkRecommendation(encoder, preset)
|
||||||
benchmarkStatus.Text = "Benchmark: Applied"
|
benchmarkStatus.Text = "Benchmark: Applied"
|
||||||
benchmarkStatus.Color = utils.MustHex("#4CE870")
|
benchmarkStatus.Color = utils.MustHex("#4CE870")
|
||||||
benchmarkStatus.Refresh()
|
benchmarkStatus.Refresh()
|
||||||
benchmarkApplyBtn.Disable()
|
benchmarkApplyBtn.Disable()
|
||||||
})
|
})
|
||||||
if applied {
|
|
||||||
benchmarkApplyBtn.Disable()
|
|
||||||
} else {
|
|
||||||
benchmarkApplyBtn.Importance = widget.MediumImportance
|
benchmarkApplyBtn.Importance = widget.MediumImportance
|
||||||
}
|
|
||||||
|
|
||||||
benchmarkIndicator = container.NewHBox(benchmarkStatus, benchmarkApplyBtn)
|
benchmarkIndicator = container.NewHBox(benchmarkStatus, benchmarkApplyBtn)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
backBar := ui.TintedBar(convertColor, container.NewHBox(
|
backBar := ui.TintedBar(convertColor, container.NewHBox(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user