From 1e49fd2f058ac20268db1f9fa0247b9d59a31466 Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Thu, 4 Dec 2025 01:03:11 -0500 Subject: [PATCH] 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(). --- main.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/main.go b/main.go index bfb58f7..905ffc1 100644 --- a/main.go +++ b/main.go @@ -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) }