#[test]
#[cfg(feature = "io")]
fn test_system_style_discovery_selection_colors() {
use azul_css::system::SystemStyle;
use azul_css::props::basic::ColorU;
use azul_css::props::basic::OptionColorU;
let style = SystemStyle::detect();
println!("\n=== SystemStyle Discovery Test ===");
println!("Theme: {:?}", style.theme);
println!("Platform: {:?}", style.platform);
println!("OS Version: {:?}", style.os_version);
println!("\n=== Colors ===");
println!("Accent: {:?}", style.colors.accent);
println!("Selection Background: {:?}", style.colors.selection_background);
println!("Selection Text: {:?}", style.colors.selection_text);
#[cfg(target_os = "macos")]
{
match style.colors.selection_background {
OptionColorU::Some(color) => {
println!("\n✓ Selection background color detected:");
println!(" RGB: ({}, {}, {}) Alpha: {}", color.r, color.g, color.b, color.a);
if color.r > 200 {
println!(" ✓ RED accent color detected - matches user's macOS settings!");
}
}
OptionColorU::None => {
println!("\n✗ No selection background color detected!");
println!(" This might mean AppleHighlightColor couldn't be read.");
}
}
}
}