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 #2815

Open
33 of 37 tasks
LukashonakV opened this issue Jan 8, 2024 · 9 comments
Open
33 of 37 tasks

GTK4 #2815

LukashonakV opened this issue Jan 8, 2024 · 9 comments
Labels
bug Something isn't working clock custom enhancement New feature or request inhibitor

Comments

@LukashonakV
Copy link
Contributor

LukashonakV commented Jan 8, 2024

Hi @Alexays , @alebastr I've done some digging into GTK4 and opportunity to migrate Waybar to it.
So. I have the first base example of the Waybar which can be build and run with gtkmm4 .
There only base engine... without any modules and event handlers. But I think it's a good start to migrate Waybar.
@Alexays is it possible for you to create for example separate branch and mark it with labels: unstable, gtk4 and to do cloning from my branch : https://github.com/LukashonakV/Waybar/tree/gtk4
I think it will provide an opportunity to contributors to make contributions, fix errors, find more effective approaches, bring new ideas, speedup the process

About versioning: 4.1.0 - the first digit means (stable release version. Currently it points to GTK4 chain), the second digit experimental version. The third digit update of the stable release. So for example the first stable release of the Waybar GTK4 should be looked like: 4.0.1. - The same versioning system now for example is used by Wine project.
So current 4.1.0 - meanse - Waybar 4 experimental 1 release without updates of the stable release

Once this approach is approved and separate branch is created it's possible to keep TODO list in this issue.

Thank you


Migration tasks


Once Waybar is migrated need to do additional sync with the master in order to pick up all PR are done since migration process was going on

@alebastr
Copy link
Contributor

alebastr commented Jan 9, 2024 via email

@LukashonakV
Copy link
Contributor Author

LukashonakV commented Jan 10, 2024

Hi @alebastr , thank you for your response. This is definitely what I was needed ,
So.
Regarding benefits... actually there are no any strong advantages waybar can get from the migration process... but according migration guide gtk team recommends to do migration from one major version to another... without any gaps. Of course it's not strictly.. but let's imagine tomorrow we will have GTK5 :))) In such case it would be more difficult to migrate Waybar from GTK3 to GTK5 ... + As I see GTK4 brought much more changes than for example GTK2->GTK3. ... So if it's possible such point can be counted as a one major benefit..
Second regarding eventbox . Actually as I saw according migration guide eventbox was dropped due to all items are are derived from the widget class . And Widget can handle any signals we need. But I still haven't had a chance to check it. If it's true I see we should revise a little AModule and ALabel architecture to satisfy new needs
Third... regarding this https://gitlab.gnome.org/GNOME/gtk/-/issues/2132 - as I see this it the long long long story :))) I think in case if we wait this ticket is solved.... we will get GTK5 :)))
Actually as I see GTK team strategy is : If possible to avoid responsibility for interaction with Wayland. And seems like that's why they cutoff some APIS. Please see comment -> https://gitlab.gnome.org/GNOME/gtk/-/issues/2132#note_760523 . So I don't see situation will change in a good way :)

Please make sure I don't insist on migration :) Just to try to figure out whether this good thing to start migration GTK3-GTK4...
And please proceed with the sound criticism

@Alexays please your thoughts ? :)

Thanks

@Alexays Alexays added the enhancement New feature or request label Jan 12, 2024
@Alexays
Copy link
Owner

Alexays commented Jan 12, 2024

Hi @alebastr and @LukashonakV.
I agree with Aleksei, I don't think anyone is still building Waybar without gtk-layer-shell, so I'm pretty ok with dropping RawSurfaceImpl to have only gtk-layer-shell.
But in view of a possible migration to GTK4, it would be a good idea to first drop RawSurfaceImpl and then check that on GTK4 the basic Widget class handles all the events, or whether we should try to migrate to GtkButton again.
Btw, I'll create a branch with your work to let anyone start working on it, with no guarantee that it will be merged into master in the near future.
To have a real advantage with this migration, it would have to bring new features that would be significant for users, why not listing these possibilities in this issue?

@Alexays Alexays changed the title GTK4 build GTK4 Jan 12, 2024
@Alexays Alexays pinned this issue Jan 12, 2024
@smsteward
Copy link

@LukashonakV I had started doing this same thing a few weeks ago as a side project, albeit in Python (I don't know any C++ unfortunately due to some bad experiences with it in undergrad). I have some basic functions written and some template classes for the bar itself, but I'm having a hard time getting the widget templates off the ground (I'm a full time SQL dev, so my free time is quite limited). If you know any Python and would like a collaborator, I'd be down to help realize this.

@5p4r74cu5
Copy link

To have a real advantage with this migration, it would have to bring new features that would be significant for users, why not listing these possibilities in this issue?

@Alexays

Hey :-) I apologise in advance if I am misunderstanding, as my technical knowledge is limited to bash scripting, but I've read in other issues that GTK4 may be relevant to implementing some aesthetically oriented features, like hover states.

I know that at the end of the day aesthetics will always be trumped by other more practical concerns, however basic features like hover states probably have a significant impact on peoples interest in using waybar. I know this is subjective, but it certainly gives the bar a somewhat dated feel.

@lucyColeclough
Copy link

lucyColeclough commented Feb 24, 2024

@5p4r74cu5
The main changes in gtk4 were to the development experience imo, with event controllers, not having to show every widget, snapshot structure, nuking cell renderers. Things like this.

The aesthetic differences were ported to gtk3 and waybar uses heavy css.

The main reason someone might want to keep up is the same with most projects in that the current version is the one that people are putting effort in to keep it compliant with all surrounding software. That said, people seem good at making old software still function, such as gimp which is still on gtk2.

On that note, when bumping the package in guix from 0.9.20 -> 0.9.21 the gtkmm-3 package uses glibmm-2.64 which is incompatible with c++ 20, giving up for now.
Arch gtkmm-3 seems to do the same though, 🤷

@5p4r74cu5
Copy link

5p4r74cu5 commented Feb 24, 2024

@lucyColeclough

Interesting, guess that explains why gimp is so damn ugly.

Perhaps GTK4 has more of an indirect role in effecting the aesthetics, like regarding hover states, as its mentioned as one of the things holding up #1120. I know hover states are just one feature, but I think it has a disproportional impact on the user experience. States visually changing on hover is so typical in modern GUIs that it essentially feels like Waybar is broken, on an intuitive level.

That said, I hear you that from a developer perspective the changes in the development experience will overshadow the effects for the average user, like me :-)

EDIT: Grammar corrections.

@lucyColeclough
Copy link

lucyColeclough commented Feb 24, 2024

@5p4r74cu5
Ah right forgot, its not as simple in 3

@4194304
Copy link

4194304 commented Mar 10, 2024

I fully support this. Being able to not use things like blur effects for me isn't acceptable. For now I'll be using workarounds to that specific problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working clock custom enhancement New feature or request inhibitor
Projects
None yet
Development

No branches or pull requests

7 participants