dweymouth / supersonic

A lightweight and full-featured cross-platform desktop client for self-hosted music servers
GNU General Public License v3.0
680 stars 27 forks source link

Migrate to Fyne 2.4.0 #245

Closed dweymouth closed 8 months ago

adamantike commented 10 months ago

@dweymouth, if you haven't started working on this one already, I can give it a try!

dweymouth commented 10 months ago

You're welcome to give it a go - I've been taking a bit of a break from this project recently but am planning to get back into it soon. I briefly tested Supersonic on Fyne 2.4.0 and noticed a few things:

adamantike commented 10 months ago

Thank you for the context! That's a lot of insight for a "brief" test :)

Most of my Fyne tweaks and API extensions have landed upstream and Supersonic now builds against Fyne 2.4.0 directly (no replace directive needed in the go.mod), but the tweak I made to switch the main loop to 10fps instead of 60fps to save background CPU will not be there. (Maybe the small increase in CPU load is fine) Also I have another Fyne modification to make sure hidden windows can't be re-shown without restarting the run loop on mac) that is not in 2.4.0 (I can add this back in later)

I found that we will still need your fork, specially for the following commits:

There is truncation of the last character on some hyperlinks due to a magic number in customhyperlink.go that will need to be adjusted as the font kerning has changed slightly. (customhyperlink is still needed to work around a limitation in the builtin hyperlink)

I found that replacing the current 2.7 factor with 4.0 fixes this (and is the smallest value that stopped generating truncated links).

I can create a PR pointing to the upstream Fyne version, to fix some of those issues, and later on add the replace to point to your updated fork, when you get the chance to rebase!

dweymouth commented 8 months ago

Currently blocked by an CPU use regression related to images - https://github.com/fyne-io/fyne/issues/4345

dweymouth commented 8 months ago

.. and unblocked by https://github.com/dweymouth/supersonic/commit/ffc6a8fc9897cc144dd5f403b7370c760fca1391! @adamantike do you still want to pick this up or should I start working on it?