xA: bump Fyne to 2.6.0
All checks were successful
Arch Linux AUR Success
OpenBSD 7.6 Success
Alpine 3.21 Success
Alpine 3.20 Abandoned

Not much has actually changed.
This commit is contained in:
2025-04-26 15:04:26 +02:00
parent e225306419
commit 4cf8c394b9
3 changed files with 99 additions and 660 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2024, Přemysl Eric Janouch <p@janouch.name>
// Copyright (c) 2024 - 2025, Přemysl Eric Janouch <p@janouch.name>
// SPDX-License-Identifier: 0BSD
package main
@@ -122,6 +122,10 @@ func (t *customTheme) Color(
variant = theme.VariantDark
}
*/
/*
// Fyne 2.6.0 has a different bug, the Light variant is not applied:
variant = theme.VariantLight
*/
// Fuck this low contrast shit, text must be black.
if name == theme.ColorNameForeground &&
@@ -402,10 +406,7 @@ func refreshIcon() {
break
}
}
// Prevent deadlocks (though it might have a race condition).
// https://github.com/fyne-io/fyne/issues/5266
go func() { wWindow.SetIcon(resource) }()
wWindow.SetIcon(resource)
}
func refreshTopic(topic []bufferLineItem) {
@@ -1094,7 +1095,10 @@ func relayRun() {
fyne.CurrentApp().Preferences().SetString(preferenceAddress, backendAddress)
backendLock.Lock()
relayResetState()
fyne.DoAndWait(func() {
relayResetState()
})
backendContext, backendCancel = context.WithCancel(context.Background())
defer backendCancel()
var err error
@@ -1102,8 +1106,10 @@ func relayRun() {
backendLock.Unlock()
if err != nil {
wConnect.Show()
showErrorMessage("Connection failed: " + err.Error())
fyne.DoAndWait(func() {
wConnect.Show()
showErrorMessage("Connection failed: " + err.Error())
})
return
}
defer backendConn.Close()
@@ -1123,12 +1129,15 @@ Loop:
if !ok {
break Loop
}
relayProcessMessage(&m)
fyne.DoAndWait(func() {
relayProcessMessage(&m)
})
}
}
wConnect.Show()
showErrorMessage("Disconnected")
fyne.DoAndWait(func() {
wConnect.Show()
showErrorMessage("Disconnected")
})
}
// --- Input line --------------------------------------------------------------