From 83c8e68f80726edabc4818457c758ed301d41342 Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Thu, 18 Dec 2025 16:09:55 -0500 Subject: [PATCH] Improve command preview button and reorganize format options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Command Preview Button: - Disabled when no video source is loaded - Shows "Show Preview" when preview is hidden - Shows "Hide Preview" when preview is visible - Makes it clear when and why the button can be used Format Options Reorganization: - Grouped formats by codec family for better readability - Order: H.264 → H.265 → AV1 → VP9 → ProRes → MPEG-2 - Added comments explaining each codec family - Makes it easier to find and compare similar codecs This improves discoverability and reduces user confusion about when the command preview is available and which format to choose. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- main.go | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index b505080..a98763f 100644 --- a/main.go +++ b/main.go @@ -417,16 +417,22 @@ type formatOption struct { } var formatOptions = []formatOption{ + // H.264 - Widely compatible, older standard {"MP4 (H.264)", ".mp4", "libx264"}, - {"MP4 (H.265)", ".mp4", "libx265"}, - {"MP4 (AV1)", ".mp4", "libaom-av1"}, - {"MKV (H.265)", ".mkv", "libx265"}, - {"MKV (AV1)", ".mkv", "libaom-av1"}, - {"WebM (VP9)", ".webm", "libvpx-vp9"}, - {"WebM (AV1)", ".webm", "libaom-av1"}, {"MOV (H.264)", ".mov", "libx264"}, + // H.265/HEVC - Better compression than H.264 + {"MP4 (H.265)", ".mp4", "libx265"}, + {"MKV (H.265)", ".mkv", "libx265"}, {"MOV (H.265)", ".mov", "libx265"}, + // AV1 - Best compression, slower encode + {"MP4 (AV1)", ".mp4", "libaom-av1"}, + {"MKV (AV1)", ".mkv", "libaom-av1"}, + {"WebM (AV1)", ".webm", "libaom-av1"}, + // VP9 - Google codec, good for web + {"WebM (VP9)", ".webm", "libvpx-vp9"}, + // ProRes - Professional/editing codec {"MOV (ProRes)", ".mov", "prores_ks"}, + // MPEG-2 - DVD standard {"DVD-NTSC (MPEG-2)", ".mpg", "mpeg2video"}, {"DVD-PAL (MPEG-2)", ".mpg", "mpeg2video"}, } @@ -5073,6 +5079,15 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject { }) cmdPreviewBtn.Importance = widget.LowImportance + // Update button text and state based on preview visibility and source + if src == nil { + cmdPreviewBtn.Disable() + } else if state.convertCommandPreviewShow { + cmdPreviewBtn.SetText("Hide Preview") + } else { + cmdPreviewBtn.SetText("Show Preview") + } + backBar := ui.TintedBar(convertColor, container.NewHBox(back, layout.NewSpacer(), navButtons, layout.NewSpacer(), cmdPreviewBtn, queueBtn)) var updateCover func(string)