pwr-Solaar / Solaar

Linux device manager for Logitech devices
https://pwr-solaar.github.io/Solaar
GNU General Public License v2.0
5.53k stars 409 forks source link

Update UI to GTK4 for a More Modern and Intuitive Experience #2558

Open RaulKong898 opened 3 months ago

RaulKong898 commented 3 months ago

Dear Solaar Development Team,

Firstly, I would like to thank you for the excellent work you have done in developing and maintaining Solaar. It is an incredibly useful tool for Logitech peripheral users on Linux. I greatly appreciate your efforts and the positive impact you have on the open-source community.

I would like to suggest an update to the graphical interface of the application to make it more modern and aligned with the latest GNOME standards. Transitioning to GTK4 could bring significant improvements in terms of appearance and performance.

Additionally, it would be wonderful if Solaar's UI could be made simpler and more intuitive, similar to the official Logitech software. A minimalist and elegant approach could make the application more pleasant and accessible to users.

I believe these improvements would add great value to the application and would be appreciated by many users.

Thank you for your attention and for your continuous efforts in developing Solaar.

Best regards,

Kong

pfps commented 3 months ago

The Solaar interface is different from the Logitech interface at least partly because emulating that interface would require a lot of work. So this change is very unlikely unless there are new people who would do the work.

Updating to GTK4 is also not planned at this time because it too would require a lot of work. In any case, is GTK4 available on all Linux platforms?

MattHag commented 3 months ago

My efforts to decouple the UI from the business logic to allow anyone working on updates and enable easier upgrades have not been taken. So it is unlikely someone will tackle this and heavily simplify the UX and bring it to the simplicity expected in 2024.

renhiyama commented 2 months ago

@pfps GTK4 is available on all major distros. Ubuntu, Fedora, Arch, Nix, Gentoo. Any consumer distro (for gaming/normal techy users) - will have access to GTK4.

Moving to GTK4 will make the app look more modern and cool, and makes it more user friendly as I've noticed with GTK4 apps.

pfps commented 2 months ago

Sure, it's a nice idea but someone has to do it. Are you volunteering?

renhiyama commented 2 months ago

I haven't made any gtk apps, but I guess this will be a nice time to learn and make something useful for everyone? I will let you know once I have learnt making gtk4 apps :)

renhiyama commented 2 months ago

btw, I was trying to run this repo's lib/solaar/ui locally, but I seem to get this error:

Traceback (most recent call last):
  File "/home/ren/coding/Solaar/lib/solaar/ui/__init__.py", line 23, in <module>
    from logitech_receiver.common import Alert
ImportError: cannot import name 'Alert' from 'logitech_receiver.common' (/usr/lib/python3.12/site-packages/logitech_receiver/common.py). Did you mean: 'ALERT'?

:sweat_smile: I dont know much about python, except the syntax and logic... Would been helpful if you could tell me what to do.

pfps commented 2 months ago

I expect that you are running two different versions of Python and have two different versions of Solaar installed. Python packages are installed separately for each version of Python. It looks as if in this case you have installed the most recent version of Solaar with some version of Python other than 3.12 but when you run Solaar you use Python 3.12, which is finding an older version of the rest of the Solaar code.

The solution is to make sure you are always using the same version of Python, and remove Solaar installations for older (or newer) versions of Python.

MattHag commented 1 month ago

I've already taken one step to simplify the transition by removing dependencies on GTK and related libs from modules, that shouldn't even know from that #2605

MattHag commented 1 month ago

I would like to suggest an update to the graphical interface of the application to make it more modern and aligned with the latest GNOME standards. Transitioning to GTK4 could bring significant improvements in terms of appearance and performance.

That's a great idea and definitely necessary. The existing UI is clunky and beginner-hostile, and I have several improvements on my list. However, the GUI related code is so hard to test and understand, that even simple things tend to be hard and make no fun and are untestable with automated tests.

The plan

The plan to go should be ...

  1. Refactor the existing code to separate the data model from the UI. Add support for unit testable UI by just feeding fake data and not having to run the whole Solaar stack. (See several of my changes related to Model-View-Presenter, which already did that and would have already prepared half of the UI code for it, but none has been approved. However, a structured code is crucial in order to tackle this. BTW: Maybe MVC fits better to GTK, I am happy about any recommendations.)
  2. Upgrade to GTK4
  3. Simplify the UI
MattHag commented 1 month ago

@RaulKong898 I am working on all things mentioned, but it will take months only for the switch to 4.0. From then on drastic UI improvements should be much easier to do and debug.

calexandru2018 commented 1 month ago

@MattHag I'll try to help on that.

MattHag commented 1 month ago

@MattHag I'll try to help on that.

Nice, would be great to continue work on my fork, which is far ahead. It has better test coverage and more steps taken to add clear interfaces between modules and model and user interface.

calexandru2018 commented 1 month ago

@MattHag any specific branch ?

MattHag commented 1 month ago

@MattHag any specific branch ?

Just the master https://github.com/MattHag/Solaar