Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-platform native GUI library #2758

Open
vulpes2 opened this issue Jan 4, 2025 · 3 comments
Open

Cross-platform native GUI library #2758

vulpes2 opened this issue Jan 4, 2025 · 3 comments

Comments

@vulpes2
Copy link
Contributor

vulpes2 commented Jan 4, 2025

Now that solaar is working reasonably well on macOS (and perhaps Windows soon), it might be a good idea to consider a library like https://github.com/beeware/toga which lets you use the OS-native GUI directly. What kind of road-blockers are present before this becomes feasible? This isn't a feature request, I'm happy to help out, just wanted to ask for opinions first.

@MattHag
Copy link
Collaborator

MattHag commented Jan 5, 2025

Hi, for macOS there's only support for configuration of devices now, but I think none of the rules work so far, but that seems doable on macOS.

That library sounds interesting, however I am not sure, which advantages it has to GTK 4.0, as we are currently using GTK 3.0.

What's necessary in any case is an interface between Solaar core and the UI with events and callbacks, which make up a nice API. Therefore, #2395 exists, which also aims for a common interface and unit testable code without requiring UI. And on the other hand, support development and debugging of the user interface with fake data, so anyone can help with that - no hardware required.

@vulpes2
Copy link
Contributor Author

vulpes2 commented Jan 5, 2025

Configuration alone is already highly useful in my opinion, rules and device list update might require some more pyobjc stuff. The benefit of toga is it would use OS-native GUI everywhere, so it looks less out of place on non-linux platforms. Porting solaar to GTK4 isn't a bad option, I just think it would be very tedious due to the lack of any good quality documentation on porting.

On the API stuff I totally agree with that, any UI work should definitely happen after the refactor.

@MattHag
Copy link
Collaborator

MattHag commented Jan 5, 2025

The Device list update already works fine on macOS. So the GUI works quite fine on macOS with GTK 3.

OS native elements sound good, that might make it easier to use native menus that actually do the same. That's something the Solaar on macOS struggles. The GUI separation and hopefully getting an API that serves UI and CLI would be an amazing step to move forward. There's a minimal draft of how better structured components interact with each other in #2676. But, it's far from complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants