[gtk4, c++] Theme parser error: gtk.css

Hello all,
I would like to ask for solving parse error.

In one computer (xubuntu) I compile gtk4 app in C++ and binaries copy to another cmputer (xubuntu too).
Code of app e.g. from my previous ask - but it is not important
( Replacing deprecated function (gtk_file_chooser_dialog_new ) for file choosing )

In second computer app is running but in terminal I see many warning (which on first computer were not).
some of warnings:

(dialog_soubor:5427): Gtk-WARNING **: 06:07:01.425: Theme parser error: gtk.css:1527:61-75: Not a valid image

(dialog_soubor:5427): Gtk-WARNING **: 06:07:01.427: Theme parser error: gtk.css:1628:715-746: No property named "-gtk-outline-bottom-left-radius"

(dialog_soubor:5427): Gtk-WARNING **: 06:07:01.427: Theme parser error: gtk.css:1630:688-720: No property named "-gtk-outline-bottom-right-radius"

I have found similar problem at ubuntu forum:
( gnome - "Gtk Warning: Theme parsing error" for no-longer-installed extension - Ask Ubuntu )

but it does not helped me :-(.

Please could anybody advice me what is missing at second computer?

See the migration guide:

Don’t use -gtk-outline-…-radius in your CSS
These non-standard properties have been removed from GTK CSS. Just use regular border radius.

Why you don’t see the warnings on one computer, don’t know, but the fact is the properties are gone and should be removed from CSS files.

If the bug is not in your code but someone else’s, then report it to them, and don’t worry about it if it’s not your fault. :slight_smile: For example, does the affected computer use a third-party GTK CSS theme? That looks to be where the errors are coming from.

Thanks! you are right. Both computers are with Xubuntu. Without warnings has setted thema Adwaita dark.

Computer with warnings has default thema Greybird. When I have switched thema to Adwaita (dark or light) warnings disappear.

thanks again!

1 Like

Brilliant! You’re welcome.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.