Skip to content
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

Closed
AnonymousWP opened this issue Feb 7, 2024 · 4 comments · Fixed by #364
Closed

bug(uad-ng): logo not visible on Windows 11 light mode #223

AnonymousWP opened this issue Feb 7, 2024 · 4 comments · Fixed by #364
Labels
bug Something isn't working

Comments

@AnonymousWP
Copy link
Member

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

image

@AnonymousWP AnonymousWP added the bug Something isn't working label Feb 7, 2024
@AnonymousWP AnonymousWP added this to the v1.0.1 release milestone Feb 7, 2024
@AnonymousWP 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 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
@AnonymousWP
Copy link
Member Author

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."),
    }
}

@AnonymousWP
Copy link
Member Author

@Universal-Debloater-Alliance/developers Can I have your opinion on this?

@lavafroth
Copy link
Contributor

lavafroth commented Mar 15, 2024 via email

@AnonymousWP
Copy link
Member Author

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
Labels
bug Something isn't working
Projects
None yet
3 participants