Scale text by font size ratio when applying system theme
Rust / build (macos-latest, stable) (push) Canceled after 0s
Rust / build (ubuntu-latest, stable) (push) Canceled after 0s
Rust / build (windows-latest, stable) (push) Canceled after 0s

This commit is contained in:
2026-10-21 14:08:35 +07:00
parent 6122474f9e
commit 36e5a18982
2 changed files with 17 additions and 1 deletions
+8 -1
View File
@@ -37,7 +37,14 @@ fn main() {
}
match SystemTheme::from_system() {
Ok(system) => apply_system_theme(&system, cx),
Ok(mut system) => {
let native = system.light.defaults.font.size;
if native > 0.0 {
let scaling = settings.theme.font_size / native;
system.accessibility.text_scaling_factor *= scaling;
}
apply_system_theme(&system, cx);
}
Err(error) => {
tracing::warn!("native theme unavailable ({error})");