frewsxcv / rust-dark-light

Rust crate to detect if dark mode or light mode is enabled
https://crates.io/crates/dark-light
81 stars 14 forks source link

Regression from v`1.0.0` #39

Open Rudxain opened 1 week ago

Rudxain commented 1 week ago

Universal-Debloater-Alliance/universal-android-debloater-next-generation#627

src/main.rs:

fn main() {
    println!("{:?}", dark_light::detect());
}

Cargo.toml:

[package]
name = "tmp"
version = "0.1.0"
edition = "2021"
[dependencies]
dark-light = "=1.1.1"
# `cargo run`: "Light"
[dependencies]
dark-light = "=1.0.0"
# `cargo run`: "Dark" (correct)

The 2 variations of dependencies from Cargo.toml where tested on separate directories, for better isolation (no need for cargo update) and to avoid recompilation of recursive deps (although I tried to recycle target/)

maplant commented 5 days ago

I experience this as well, dark-light version 1.1.1 returns an incorrect theme for detect I'm on Fedora 40, Gnome 46 on X11