Tighten thumbnail columns and queue refresh
This commit is contained in:
parent
8cfa43b210
commit
c80619f711
8
main.go
8
main.go
|
|
@ -1830,7 +1830,7 @@ func (s *appState) clearCompletedJobs() {
|
||||||
func (s *appState) refreshQueueView() {
|
func (s *appState) refreshQueueView() {
|
||||||
if s.active == "queue" {
|
if s.active == "queue" {
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
if !s.queueLastRefresh.IsZero() && now.Sub(s.queueLastRefresh) < 500*time.Millisecond {
|
if !s.queueLastRefresh.IsZero() && now.Sub(s.queueLastRefresh) < 200*time.Millisecond {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
s.queueLastRefresh = now
|
s.queueLastRefresh = now
|
||||||
|
|
@ -2027,10 +2027,8 @@ func (s *appState) startQueueAutoRefresh() {
|
||||||
s.queueAutoRefreshStop = stop
|
s.queueAutoRefreshStop = stop
|
||||||
s.queueAutoRefreshRunning = true
|
s.queueAutoRefreshRunning = true
|
||||||
go func() {
|
go func() {
|
||||||
// Use 2-second interval to reduce UI jankiness from frequent rebuilds
|
// Short interval keeps elapsed/progress responsive with incremental UI updates.
|
||||||
// Slower refresh = smoother experience, especially with scroll position preservation
|
ticker := time.NewTicker(500 * time.Millisecond)
|
||||||
// The refreshQueueView method has its own 500ms throttle for other triggers
|
|
||||||
ticker := time.NewTicker(2000 * time.Millisecond)
|
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ func buildThumbView(state *appState) fyne.CanvasObject {
|
||||||
totalLabel.TextStyle = fyne.TextStyle{Italic: true}
|
totalLabel.TextStyle = fyne.TextStyle{Italic: true}
|
||||||
totalLabel.Wrapping = fyne.TextWrapWord
|
totalLabel.Wrapping = fyne.TextWrapWord
|
||||||
|
|
||||||
colSlider := widget.NewSlider(2, 12)
|
colSlider := widget.NewSlider(2, 9)
|
||||||
colSlider.Value = float64(state.thumbColumns)
|
colSlider.Value = float64(state.thumbColumns)
|
||||||
colSlider.Step = 1
|
colSlider.Step = 1
|
||||||
colSlider.OnChanged = func(val float64) {
|
colSlider.OnChanged = func(val float64) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user