Hide CRF UI when mode not CRF
This commit is contained in:
parent
89f887bdf3
commit
5d638bfa62
21
main.go
21
main.go
|
|
@ -8448,6 +8448,24 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
showTarget := mode == "Target Size"
|
showTarget := mode == "Target Size"
|
||||||
showManualCRF := strings.EqualFold(state.convert.Quality, manualQualityOption)
|
showManualCRF := strings.EqualFold(state.convert.Quality, manualQualityOption)
|
||||||
|
|
||||||
|
if !showCRF && state.convert.Quality == manualQualityOption {
|
||||||
|
state.convert.Quality = "Standard (CRF 23)"
|
||||||
|
for _, w := range uiState.qualityWidgets {
|
||||||
|
w.SetSelectedSilent(state.convert.Quality)
|
||||||
|
}
|
||||||
|
showManualCRF = false
|
||||||
|
}
|
||||||
|
|
||||||
|
if !showCRF {
|
||||||
|
state.convert.CRF = ""
|
||||||
|
if crfEntry != nil && crfEntry.Text != "" {
|
||||||
|
crfEntry.SetText("")
|
||||||
|
}
|
||||||
|
if manualCrfRow != nil {
|
||||||
|
manualCrfRow.Hide()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if isLossless && supportsLossless {
|
if isLossless && supportsLossless {
|
||||||
// Lossless with H.265/AV1: Allow all bitrate modes
|
// Lossless with H.265/AV1: Allow all bitrate modes
|
||||||
// The lossless quality affects the encoding, but bitrate/target size still control output
|
// The lossless quality affects the encoding, but bitrate/target size still control output
|
||||||
|
|
@ -8506,6 +8524,9 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateEncodingControls()
|
updateEncodingControls()
|
||||||
|
if updateQualityVisibility != nil {
|
||||||
|
updateQualityVisibility()
|
||||||
|
}
|
||||||
|
|
||||||
// Target Resolution (advanced)
|
// Target Resolution (advanced)
|
||||||
resolutionOptions := []string{
|
resolutionOptions := []string{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user