The size and spacing around the traffic light buttons changes after macOS SDK 26. Our official builds aren't using this SDK yet, but dev builds sometimes are and the official will in the future. <table> <tr> <th>Before</th> <th>After</th> </tr> <tr> <td> <img width="582" height="146" alt="CleanShot 2025-12-19 at 08 58 53@2x" src="https://github.com/user-attachments/assets/1a28d74a-98a3-49d0-98d6-ab05b0580665" /> </td> <td> <img width="610" height="156" alt="CleanShot 2025-12-19 at 08 57 02@2x" src="https://github.com/user-attachments/assets/7b7693b3-baa1-4d7e-9fc1-bd7a7bfacd36" /> </td> </tr> <tr> <td> <img width="532" height="154" alt="CleanShot 2025-12-19 at 08 59 40@2x" src="https://github.com/user-attachments/assets/df7f40e7-7576-44f2-9cf3-047a5d00bb4e" /> </td> <td> <img width="520" height="150" alt="CleanShot 2025-12-19 at 09 01 17@2x" src="https://github.com/user-attachments/assets/b0fbdeb6-1b1d-4e7a-95d0-3c78f0569df1" /> </td> </tr> </table> Release Notes: - N/A
29 lines
753 B
Rust
29 lines
753 B
Rust
#![allow(clippy::disallowed_methods, reason = "build scripts are exempt")]
|
|
|
|
fn main() {
|
|
println!("cargo::rustc-check-cfg=cfg(macos_sdk_26)");
|
|
|
|
#[cfg(target_os = "macos")]
|
|
{
|
|
use std::process::Command;
|
|
|
|
let output = Command::new("xcrun")
|
|
.args(["--sdk", "macosx", "--show-sdk-version"])
|
|
.output()
|
|
.unwrap();
|
|
|
|
let sdk_version = String::from_utf8(output.stdout).unwrap();
|
|
let major_version: Option<u32> = sdk_version
|
|
.trim()
|
|
.split('.')
|
|
.next()
|
|
.and_then(|v| v.parse().ok());
|
|
|
|
if let Some(major) = major_version
|
|
&& major >= 26
|
|
{
|
|
println!("cargo:rustc-cfg=macos_sdk_26");
|
|
}
|
|
}
|
|
}
|