Add colored header and footer bars to Compare module

The Compare module now has colored bars at the top and bottom matching
its pink visual identity from the main menu. This creates visual
consistency with the Convert module and strengthens the app's
overall design language.

Changes:
- Added top bar with back button using ui.TintedBar
- Added bottom bar with module color
- Restructured layout to use container.NewBorder
- Made content area scrollable

The colored bars use the module's color (#FF44AA pink) as defined
in modulesList and retrieved via moduleColor().
This commit is contained in:
Stu Leak 2025-12-04 01:03:11 -05:00
parent c47f2ca95b
commit 21719a9b89

21
main.go
View File

@ -5287,17 +5287,14 @@ func formatBitrate(bps int) string {
func buildCompareView(state *appState) fyne.CanvasObject {
compareColor := moduleColor("compare")
// Header
title := canvas.NewText("COMPARE VIDEOS", compareColor)
title.TextStyle = fyne.TextStyle{Monospace: true, Bold: true}
title.TextSize = 24
backBtn := widget.NewButton("← Back to Menu", func() {
// Back button
backBtn := widget.NewButton("< COMPARE", func() {
state.showMainMenu()
})
backBtn.Importance = widget.LowImportance
header := container.NewBorder(nil, nil, backBtn, nil, container.NewCenter(title))
// Top bar with module color
topBar := ui.TintedBar(compareColor, container.NewHBox(backBtn, layout.NewSpacer()))
// Instructions
instructions := widget.NewLabel("Load two videos to compare their metadata and visual differences side by side. Drag videos here or use buttons below.")
@ -5510,9 +5507,11 @@ func buildCompareView(state *appState) fyne.CanvasObject {
container.NewScroll(file2Info),
)
// Bottom bar with module color
bottomBar := ui.TintedBar(compareColor, container.NewHBox(layout.NewSpacer()))
// Main content
content := container.NewVBox(
header,
widget.NewSeparator(),
instructions,
widget.NewSeparator(),
compareBtn,
@ -5523,5 +5522,7 @@ func buildCompareView(state *appState) fyne.CanvasObject {
),
)
return container.NewPadded(content)
scrollableContent := container.NewVScroll(content)
return container.NewBorder(topBar, bottomBar, nil, nil, scrollableContent)
}