Compare commits
4 Commits
1eb2d11ccd
...
484a636fb4
| Author | SHA1 | Date | |
|---|---|---|---|
| 484a636fb4 | |||
| f2ac544d75 | |||
| a5ad368d0f | |||
| 320f522d85 |
|
|
@ -487,12 +487,12 @@ func (c *ConversionStatsBar) UpdateStatsWithDetails(running, pending, completed,
|
|||
|
||||
// CreateRenderer creates the renderer for the stats bar
|
||||
func (c *ConversionStatsBar) CreateRenderer() fyne.WidgetRenderer {
|
||||
bg := canvas.NewRectangle(color.NRGBA{R: 30, G: 30, B: 30, A: 255})
|
||||
bg.CornerRadius = 4
|
||||
bg.StrokeColor = GridColor
|
||||
bg.StrokeWidth = 1
|
||||
// Transparent background so the parent tinted bar color shows through
|
||||
bg := canvas.NewRectangle(color.Transparent)
|
||||
bg.CornerRadius = 0
|
||||
bg.StrokeWidth = 0
|
||||
|
||||
statusText := canvas.NewText("", TextColor)
|
||||
statusText := canvas.NewText("", color.NRGBA{R: 230, G: 236, B: 245, A: 255})
|
||||
statusText.TextStyle = fyne.TextStyle{Monospace: true}
|
||||
statusText.TextSize = 11
|
||||
|
||||
|
|
@ -525,7 +525,7 @@ func (r *conversionStatsRenderer) Layout(size fyne.Size) {
|
|||
|
||||
// Layout text and progress bar
|
||||
textSize := r.statusText.MinSize()
|
||||
padding := float32(8)
|
||||
padding := float32(10)
|
||||
|
||||
// If there's a running job, show progress bar
|
||||
if r.bar.running > 0 && r.bar.progress > 0 {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ func (r *stripedProgressRenderer) Layout(size fyne.Size) {
|
|||
r.bg.Resize(size)
|
||||
r.bg.Move(fyne.NewPos(0, 0))
|
||||
|
||||
fillWidth := size.Width * r.bar.progress
|
||||
fillWidth := size.Width * float32(r.bar.progress)
|
||||
fillSize := fyne.NewSize(fillWidth, size.Height)
|
||||
|
||||
r.fill.Resize(fillSize)
|
||||
|
|
|
|||
93
main.go
93
main.go
|
|
@ -4161,6 +4161,39 @@ func runLogsCLI() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *appState) executeAddToQueue() {
|
||||
if err := s.addConvertToQueue(); err != nil {
|
||||
dialog.ShowError(err, s.window)
|
||||
} else {
|
||||
dialog.ShowInformation("Queue", "Job added to queue!", s.window)
|
||||
// Auto-start queue if not already running
|
||||
if s.jobQueue != nil && !s.jobQueue.IsRunning() && !s.convertBusy {
|
||||
s.jobQueue.Start()
|
||||
logging.Debug(logging.CatUI, "queue auto-started after adding job")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (s *appState) executeConversion() {
|
||||
// Add job to queue and start immediately
|
||||
if err := s.addConvertToQueue(); err != nil {
|
||||
dialog.ShowError(err, s.window)
|
||||
return
|
||||
}
|
||||
|
||||
// Start the queue if not already running
|
||||
if s.jobQueue != nil && !s.jobQueue.IsRunning() {
|
||||
s.jobQueue.Start()
|
||||
logging.Debug(logging.CatSystem, "started queue from Convert Now")
|
||||
}
|
||||
|
||||
// Clear the loaded video from convert module
|
||||
s.clearVideo()
|
||||
|
||||
// Show success message
|
||||
dialog.ShowInformation("Convert", "Conversion started! View progress in Job Queue.", s.window)
|
||||
}
|
||||
|
||||
func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||
convertColor := moduleColor("convert")
|
||||
|
||||
|
|
@ -5735,16 +5768,25 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
|||
// Add to Queue button
|
||||
addQueueBtn := widget.NewButton("Add to Queue", func() {
|
||||
state.persistConvertConfig()
|
||||
if err := state.addConvertToQueue(); err != nil {
|
||||
dialog.ShowError(err, state.window)
|
||||
} else {
|
||||
dialog.ShowInformation("Queue", "Job added to queue!", state.window)
|
||||
// Auto-start queue if not already running
|
||||
if state.jobQueue != nil && !state.jobQueue.IsRunning() && !state.convertBusy {
|
||||
state.jobQueue.Start()
|
||||
logging.Debug(logging.CatUI, "queue auto-started after adding job")
|
||||
}
|
||||
|
||||
// Check if converting a file with chapters to DVD format
|
||||
isDVD := state.convert.SelectedFormat.Ext == ".mpg"
|
||||
if state.source != nil && state.source.HasChapters && isDVD {
|
||||
dialog.ShowConfirm("Chapter Warning",
|
||||
"This file contains chapters, but DVD/MPEG format does not support embedded chapters.\n\n"+
|
||||
"Chapters will be lost in the conversion.\n\n"+
|
||||
"Consider using MKV or MP4 format to preserve chapters.\n\n"+
|
||||
"Continue anyway?",
|
||||
func(confirmed bool) {
|
||||
if !confirmed {
|
||||
return
|
||||
}
|
||||
state.executeAddToQueue()
|
||||
}, state.window)
|
||||
return
|
||||
}
|
||||
|
||||
state.executeAddToQueue()
|
||||
})
|
||||
if src == nil {
|
||||
addQueueBtn.Disable()
|
||||
|
|
@ -5752,23 +5794,25 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
|||
|
||||
convertBtn = widget.NewButton("CONVERT NOW", func() {
|
||||
state.persistConvertConfig()
|
||||
// Add job to queue and start immediately
|
||||
if err := state.addConvertToQueue(); err != nil {
|
||||
dialog.ShowError(err, state.window)
|
||||
|
||||
// Check if converting a file with chapters to DVD format
|
||||
isDVD := state.convert.SelectedFormat.Ext == ".mpg"
|
||||
if state.source != nil && state.source.HasChapters && isDVD {
|
||||
dialog.ShowConfirm("Chapter Warning",
|
||||
"This file contains chapters, but DVD/MPEG format does not support embedded chapters.\n\n"+
|
||||
"Chapters will be lost in the conversion.\n\n"+
|
||||
"Consider using MKV or MP4 format to preserve chapters.\n\n"+
|
||||
"Continue anyway?",
|
||||
func(confirmed bool) {
|
||||
if !confirmed {
|
||||
return
|
||||
}
|
||||
state.executeConversion()
|
||||
}, state.window)
|
||||
return
|
||||
}
|
||||
|
||||
// Start the queue if not already running
|
||||
if state.jobQueue != nil && !state.jobQueue.IsRunning() {
|
||||
state.jobQueue.Start()
|
||||
logging.Debug(logging.CatSystem, "started queue from Convert Now")
|
||||
}
|
||||
|
||||
// Clear the loaded video from convert module
|
||||
state.clearVideo()
|
||||
|
||||
// Show success message
|
||||
dialog.ShowInformation("Convert", "Conversion started! View progress in Job Queue.", state.window)
|
||||
state.executeConversion()
|
||||
})
|
||||
convertBtn.Importance = widget.HighImportance
|
||||
if src == nil {
|
||||
|
|
@ -10313,9 +10357,6 @@ func buildInspectView(state *appState) fyne.CanvasObject {
|
|||
)
|
||||
|
||||
// Bottom bar with module color
|
||||
queueBtn := widget.NewButton("View Queue", func() {
|
||||
state.showQueue()
|
||||
})
|
||||
statusLabel := widget.NewLabel("Idle")
|
||||
statusLabel.Alignment = fyne.TextAlignCenter
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user