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

Updating to GTK 4 #2491

Open
ManuInDenWolken opened this issue Sep 10, 2023 · 10 comments
Open

Updating to GTK 4 #2491

ManuInDenWolken opened this issue Sep 10, 2023 · 10 comments
Labels

Comments

@ManuInDenWolken
Copy link

Updating to GTK 4 provides a variety of features. CSS properties like font-variation-settings for example. And there are plenty of further changes. I am extensively using Google's Material Symbols which are built as variable fonts. This decision enforces for example the use of a font variation setting if you want to fill the battery symbol. The framework has to be changed to GTK 4, the layer shell respectively to gtk4-layer-shell (a separate repository). Unfortunately, I have neither time nor expertise to perform this migration. It requires some deeper structural changes (the event mappings of modules for example [include/AModule.hpp:48]) and design decisions I don't want to make.

@khaneliman
Copy link
Contributor

Looks like there's a migration documentation https://docs.gtk.org/gtk4/migrating-3to4.html that could be helpful for people to look at. This might be something we can break up into smaller chunks that can be done while using GTK3 and then the GTK4 PR can handle the stuff that can't be done beforehand.

@ManuInDenWolken
Copy link
Author

Surely. I read the documentation and I began the refactorings. But the design changes I made were so profound, I figured I shouldn't decide this. The design could be changed piece by piece, but the migration from GTK 3 to 4 has to be done all at once. You're definitely right with that. I'd very much appreciate it if someone would go for this step. Otherwise I'll have to wait a few weeks before I can take the time to do it.

@LukashonakV
Copy link
Contributor

There are at least 2 things that were found a year ago when I was trying to migrate it to GDK4:

  1. The rotate method is not provided by the Gdk Label. At least the label could be replaced by the button. Actually, I saw the try(means merge request) where in current waybar implementation, Label was replaced by the button. But for some reason, it was rolled back
  2. Actually, I forgot. But it was something blocking.. . Some method which is totally ignored in GTK4 without any alternatives.. need to revise what it was...

@ManuInDenWolken
Copy link
Author

There are at least 2 things that were found a year ago when I was trying to migrate it to GDK4:

  1. The rotate method is not provided by the Gdk Label. At least the label could be replaced by the button. Actually, I saw the try(means merge request) where in current waybar implementation, Label was replaced by the button. But for some reason, it was rolled back
  2. Actually, I forgot. But it was something blocking.. . Some method which is totally ignored in GTK4 without any alternatives.. need to revise what it was...

Looks like something worth picking up again. What's wrong with this label? Isn't it possible to handle an interaction on such a label? From what I read so far, there's actually no difference to the old one. And rotation is definitely possible, in source and style sheets. Though something that's worth a look again?

@jack9603301
Copy link

This piqued my interest, however, my time is limited, so I will only try it as a hobby (of course, it may not be realized in the end), if anyone completes it before this, then, great

@ManuInDenWolken
Copy link
Author

This piqued my interest, however, my time is limited, so I will only try it as a hobby (of course, it may not be realized in the end), if anyone completes it before this, then, great

That would be great. There are design changes to make and then the actual migration to do. You can use the earlier mentioned migration guide as an orientation for the second part.

@jack9603301
Copy link

This piqued my interest, however, my time is limited, so I will only try it as a hobby (of course, it may not be realized in the end), if anyone completes it before this, then, great

That would be great. There are design changes to make and then the actual migration to do. You can use the earlier mentioned migration guide as an orientation for the second part.

okay

@haras-unicorn
Copy link

Would this mean adding #1120 back in? I just wanna know if we're going to be able to use :hover on stuff.

@ManuInDenWolken
Copy link
Author

Would this mean adding #1120 back in? I just wanna know if we're going to be able to use :hover on stuff.

It would. But unfortunately, there's no serious attempt to migrate yet...

@LukashonakV
Copy link
Contributor

LukashonakV commented Feb 22, 2024

There are at least 2 things that were found a year ago when I was trying to migrate it to GDK4:

  1. The rotate method is not provided by the Gdk Label. At least the label could be replaced by the button. Actually, I saw the try(means merge request) where in current waybar implementation, Label was replaced by the button. But for some reason, it was rolled back
  2. Actually, I forgot. But it was something blocking.. . Some method which is totally ignored in GTK4 without any alternatives.. need to revise what it was...

Looks like something worth picking up again. What's wrong with this label? Isn't it possible to handle an interaction on such a label? From what I read so far, there's actually no difference to the old one. And rotation is definitely possible, in source and style sheets. Though something that's worth a look again?

set_angle method is dropped in the GTK4 without any alternatives. So for now it's impossible to do text rotation in the label
There's another way is mentioned by the GTK maintainers https://gitlab.gnome.org/GNOME/gtk/-/blob/main/demos/gtk-demo/rotated_text.c which I'm digging in....

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

No branches or pull requests

6 participants