Scale text by font size ratio when applying system theme
This commit is contained in:
+8
-1
@@ -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})");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user