-
Notifications
You must be signed in to change notification settings - Fork 59
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
bug(uad-ng): logo not visible on Windows 11 light mode #223
Labels
bug
Something isn't working
Milestone
Comments
AnonymousWP
changed the title
bug(uad): logo not visible on Windows 11
bug(uad-ng): logo not visible on Windows 11
Feb 7, 2024
Frigyes06
changed the title
bug(uad-ng): logo not visible on Windows 11
bug(uad-ng): logo not visible on Windows 11 light mode
Feb 7, 2024
Would this work? use std::process::Command;
fn get_windows_theme() -> Option<String> {
let output = Command::new("reg")
.args(&["query", "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", "/v", "AppsUseLightTheme"])
.output()
.ok()?;
let output_str = String::from_utf8(output.stdout).ok()?;
let theme_value = output_str.lines().nth(2)?;
if theme_value.contains("0x1") {
Some("Dark".to_string())
} else {
Some("Light".to_string())
}
}
fn main() {
match get_windows_theme() {
Some(theme) => {
if theme == "Dark" {
println!("Using logo A for dark mode");
// Display logo A
} else {
println!("Using logo B for light mode");
// Display logo B
}
}
None => println!("Failed to determine Windows theme."),
}
} |
@Universal-Debloater-Alliance/developers Can I have your opinion on this? |
There's a platform independent crate called light-dark, better use that instead of reg queries lest some antivirus incorrectly flags us.
|
Yeah, valid point, I thought the same. Unfortunately ChatGPT did not consider that, lol. Unfortunately I don't have Rust-knowledge, so hopefully ChatGPT knows about that crate. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Due to the white text, logo isn't visible.
Expected behavior
The logo should be visible.
You have a solution?
No, but probably use a different logo depending on the user's theme. Like: follow system theme. If dark, use transparent logo, if not, use logo with black background.
Screenshot
The text was updated successfully, but these errors were encountered: