Migration to Gtk4 for Linux #1935
-
Is there a plan to migrate to GTK4? The current implementation is based on GTK3, which is working but would require significant changes to comply with the new Human Interface Guidelines (HIG). Unfortunately, these changes would be invalidated when the migration to GTK4 takes place. As a quick example, some method of HeaderBar doesn't exist in Gtk3 or Gtk4. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
We're definitely aware that GTK4 exists, and that a migration will need to happen at some point. However, at present, we don't have any specific plans to perform a migration. If I had to guess, the most likely approach to the migration would be to leverage the work we're currently doing with the widget audit. We're currently working through each widget in turn, auditing the API and implementation, and building test harnesses for the GUI aspects so that we can get to 100% test coverage for every widget. Our aim is to get to 100% coverage of widgets by mid-year. Once that test coverage in place, we'll be in a much better place to do a large scale migration, because the acceptance criteria for a GTK4 port becomes "does the test suite pass?", rather than a need for detailed hand audit of every feature in the GTK backend. If someone (cough... you? :-) ) is up for a long-term project, one approach might be to open a draft GTK4 branch, and shadow the work the core team is doing on the widget audit. At present, that means you'd only need to port 9 widgets to GTK4 (ActivityIndicator, Button, Divider, Label, ProgressBar, Slider, Switch, Box and the base Widget), plus presumably some core infrastructure around the app and window objects. This branch wouldn't be merged quickly - it would be an ongoing project that is periodically merged with the main branch as the audit of individual widgets is completed. Once the widget audit is complete, the GTK4 branch should be ready to perform a wholesale switch, with full test coverage. That said - I won't profess to being a GTK expert; my understanding is that GTK4 is a "backwards incompatible specifics, but fundamentally compatible at a conceptual level" migration. There might be a bunch of API changes that are required, some new capabilities that become available, and some options that we won't have access to until we migrate - but fundamentally, GTK4 "tastes" about the same as GTK3. If that's not the case, and the move to GTK4 will require some more radical changes, then maybe we would be better served migrating before we audit a bunch of widgets with the GTK3 API. Are you in a position to provide any guidance on this? |
Beta Was this translation helpful? Give feedback.
-
It seems that, but I am not sure.
I quickly investigated some widgets, and found that some of them are missing important properties that are used in layout. For example, the
Does the previous help? |
Beta Was this translation helpful? Give feedback.
We're definitely aware that GTK4 exists, and that a migration will need to happen at some point. However, at present, we don't have any specific plans to perform a migration.
If I had to guess, the most likely approach to the migration would be to leverage the work we're currently doing with the widget audit. We're currently working through each widget in turn, auditing the API and implementation, and building test harnesses for the GUI aspects so that we can get to 100% test coverage for every widget. Our aim is to get to 100% coverage of widgets by mid-year. Once that test coverage in place, we'll be in a much better place to do a large scale migration, because the acceptance criteria f…