Fix convert UI build errors and QR image init
This commit is contained in:
parent
32cbd3e288
commit
7183e43887
14
main.go
14
main.go
|
|
@ -498,7 +498,7 @@ func generatePixelatedQRCode() (fyne.CanvasObject, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert to Fyne image with pixelated look
|
// Convert to Fyne image with pixelated look
|
||||||
img := canvas.NewImageFromBytes(qrBytes)
|
img := canvas.NewImageFromReader(bytes.NewReader(qrBytes), "qrcode.png")
|
||||||
img.FillMode = canvas.ImageFillOriginal // Keep pixelated look
|
img.FillMode = canvas.ImageFillOriginal // Keep pixelated look
|
||||||
img.SetMinSize(fyne.NewSize(160, 160))
|
img.SetMinSize(fyne.NewSize(160, 160))
|
||||||
|
|
||||||
|
|
@ -6983,6 +6983,10 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
formatLabels = append(formatLabels, opt.Label)
|
formatLabels = append(formatLabels, opt.Label)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var outputExtLabel *widget.Label
|
||||||
|
var outputExtBG *canvas.Rectangle
|
||||||
|
var updateOutputHint func()
|
||||||
|
|
||||||
// Format selector
|
// Format selector
|
||||||
formatColors := ui.BuildFormatColorMap(formatLabels)
|
formatColors := ui.BuildFormatColorMap(formatLabels)
|
||||||
formatContainer := ui.NewColoredSelect(formatLabels, formatColors, func(selected string) {
|
formatContainer := ui.NewColoredSelect(formatLabels, formatColors, func(selected string) {
|
||||||
|
|
@ -7012,10 +7016,6 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
}, state.window)
|
}, state.window)
|
||||||
formatContainer.SetSelected(state.convert.SelectedFormat.Label)
|
formatContainer.SetSelected(state.convert.SelectedFormat.Label)
|
||||||
|
|
||||||
var outputExtLabel *widget.Label
|
|
||||||
var outputExtBG *canvas.Rectangle
|
|
||||||
var updateOutputHint func()
|
|
||||||
|
|
||||||
getOutputDir := func() string {
|
getOutputDir := func() string {
|
||||||
if strings.TrimSpace(state.convert.OutputDir) != "" {
|
if strings.TrimSpace(state.convert.OutputDir) != "" {
|
||||||
return state.convert.OutputDir
|
return state.convert.OutputDir
|
||||||
|
|
@ -7077,8 +7077,8 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
manualBitrateRow *fyne.Container
|
manualBitrateRow *fyne.Container
|
||||||
targetFileSizeSelect *widget.Select
|
targetFileSizeSelect *widget.Select
|
||||||
targetFileSizeEntry *widget.Entry
|
targetFileSizeEntry *widget.Entry
|
||||||
qualitySelectSimple *widget.Select
|
qualitySelectSimple *ui.ColoredSelect
|
||||||
qualitySelectAdv *widget.Select
|
qualitySelectAdv *ui.ColoredSelect
|
||||||
qualitySectionSimple fyne.CanvasObject
|
qualitySectionSimple fyne.CanvasObject
|
||||||
qualitySectionAdv fyne.CanvasObject
|
qualitySectionAdv fyne.CanvasObject
|
||||||
simpleBitrateSelect *widget.Select
|
simpleBitrateSelect *widget.Select
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user