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 port + FreeDesktop automatic light/dark theme support #45

Open
nekohayo opened this issue Nov 24, 2023 · 2 comments
Open

GTK4 port + FreeDesktop automatic light/dark theme support #45

nekohayo opened this issue Nov 24, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@nekohayo
Copy link

I suppose you're already aware of all these things, but at least this is a ticket for tracking this, and maybe in case someone wants to help with this...

It would be a good thing to:

@nekohayo nekohayo added the enhancement New feature or request label Nov 24, 2023
@flozz
Copy link
Owner

flozz commented Nov 24, 2023

Hello,

The last time I looked to port YOGA Image Optimizer to GTK4, the tools were not ready (it was about one or two years ago). Especially Glade that only supports GTK3, and its replacement, Cambalache, that was very very new. Gvsbuild had no GTK4 support neither at thas time.

I have to look again to see how everything evolved now. I will try to do a macOS port of the App soon, so I may work on the GTK4 port right after :)

Thank you for all the links

@flozz
Copy link
Owner

flozz commented Nov 24, 2023

I had a quick look. It seems there is not too much deprecated properties used:

$ export G_ENABLE_DIAGNOSTIC=1 
$ python -m yoga_image_optimizer
/.../yoga-image-optimizer.git/yoga_image_optimizer/main_window.py:40: Warning: The property GtkWidget:margin-left is deprecated and shouldn't be used anymore. It will be removed in a future version.
  self._builder.add_from_file(data_helpers.find_data_path("ui/main-window.glade"))
/.../yoga-image-optimizer.git/yoga_image_optimizer/main_window.py:40: Warning: The property GtkWidget:margin-right is deprecated and shouldn't be used anymore. It will be removed in a future version.
  self._builder.add_from_file(data_helpers.find_data_path("ui/main-window.glade"))
/.../yoga-image-optimizer.git/yoga_image_optimizer/main_window.py:40: Warning: The property GtkWidget:double-buffered is deprecated and shouldn't be used anymore. It will be removed in a future version.
  self._builder.add_from_file(data_helpers.find_data_path("ui/main-window.glade"))
/.../yoga-image-optimizer.git/yoga_image_optimizer/settings_window.py:31: Warning: The property GtkAlignment:top-padding is deprecated and shouldn't be used anymore. It will be removed in a future version.
  self._builder.add_from_file(

But we use some other deprecated/removed things like Gdk.Screen.

The UI files will require some manual work to convert them (it seems there is no automatic migration tool for them).

It seems Gvsbuild now support GTK 4 (but I not tested), and Cambalache seems more complete than the next time I looked at it :)

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

No branches or pull requests

2 participants