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

GTK4 - themes - investigate style APIs and path forward #397

Open
rozniak opened this issue Dec 9, 2024 · 0 comments
Open

GTK4 - themes - investigate style APIs and path forward #397

rozniak opened this issue Dec 9, 2024 · 0 comments
Assignees
Labels
needs-thought This issue is a larger thought and proposal and needs time.

Comments

@rozniak
Copy link
Owner

rozniak commented Dec 9, 2024

This project targets GTK3 currently - long term it will be necessary to upgrade deps to GTK4, then GTK5 so on and so forth to keep up with the world.

GTK4 changes a lot of stuff with a lot of things reaching a total dead end at GTK5, like the gtk-theme setting. Not entirely sure what's happening with other stuff like icon themes, they might potentially also get binned upstream.

Whilst the project is GTK3 at the moment, I have been writing it with an eye on GTK4 and keeping somewhat closely to the migration notes. Migrating the GTK4 probably would not be an entire issue in terms of the projects structure (I removed pretty much all the widget subclassing not too long ago), but mainly in areas such as themes and GNOME-ification(?).

There is the 'XApp' project, headed mainly by Linux Mint, but I'm not sure it's going anywhere. Staying on GTK 3 forever is a non-starter, and I'm not migrating to Qt (either suffering C++ or some bodged up C bindings).

I think it might be necessary to just try and get the ball rolling at some point with perhaps an alternative to libadwaita. My understanding for GTK4 was stripping out the Adwaita-ry stuff to a separate widget library. The solution for projects like this one is obviously a widget library focused on supporting themes or whatever else gets dropped.

Put simply - I have had it in mind for a while to create an 'XApp' widget library (if it could be called that). Like a GXK or 'GNOME XApp Kit' of sorts, as an alternative to libadwaita, for GTK4.

Need to:

  • Test out GTK4 in its most basic form with some simple programs to see what we're working with
  • Investigate the style APIs - they look pretty gutted
    • How is libadwaita so strict about style if the APIs are gutted?
    • Would it be necessary to write custom style APIs? I have been thinking this anyway because CSS is just miserable really and not as robust as I would like for the purpose of a widget library.
  • Starting things up:
    • Test out the theories above RE: custom style APIs etc. - nothing drafted, just some proof-of-concepts will do to see what is viable
    • Based on whatever the conclusion is, begin drafting a design for a robust theme API
    • Questions to be asked about: ease of porting, like-for-like UI (no regressions after porting), extensibility (for developers and users)
  • Push forward by example:
    • With stuff being actively deprecated and removed, there's not much reason to hang around bickering like Freedesktop always does
    • The widget library would be somewhat 'standard' if it's actually viable and useful for developers to use

Probably won't get much done on this 'til at least the new year but I have been thinking on-and-off about it for months whilst chipping away at this project.

@rozniak rozniak added the needs-thought This issue is a larger thought and proposal and needs time. label Dec 9, 2024
@rozniak rozniak self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-thought This issue is a larger thought and proposal and needs time.
Projects
None yet
Development

No branches or pull requests

1 participant