gtk-rs / gtk4-rs

Rust bindings of GTK 4
https://gtk-rs.org/gtk4-rs/
MIT License
1.81k stars 168 forks source link

Support for dark mode #1797

Open philip-peterson opened 1 month ago

philip-peterson commented 1 month ago

I went looking for information on dark mode. It seems like it is normally supported by GTK4 apps through libadwaita. The way to access this through Rust may be libadwaita's StyleManager::is_dark.

https://docs.rs/libadwaita/latest/libadwaita/struct.StyleManager.html#method.is_dark

sdroege commented 1 month ago

As this is a general GTK question not directly related to the bindings, you'll probably have more luck at https://discourse.gnome.org

martinling commented 2 days ago

See https://github.com/greatscottgadgets/packetry/pull/166 for an example of doing this without libadwaita.