Skip to content

CSS example does not compile today #1530

Closed Answered by philippe06150
philippe06150 asked this question in Q&A
Discussion options

You must be logged in to vote

OK, I have found the glitch, I answer to myself !

replace "provider.load_from_string" by "provider.load_from_data" works, but that is because my GTK install is obsolete.

load_from_string seems to be a new code in gtk : https://docs.gtk.org/gtk4/method.CssProvider.load_from_string.html

in fact, my GTK (on WIN11) is obsolete, I have to update it, Il setup with MSYS, thus I must do : "pacman -Syu" to update GTK to 4.12

so when i put in toml

[dependencies]
gtk = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gtk4" , features = ["v4_12"]}

it works with load_from_string !

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by philippe06150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant