Make agent font size inherit the UI font size by default (#36306)

Ensures issues like #36242 and #36295 do not arise where users are
confused that the agent panel does not follow the default UI font size
whilst also keeping the possibility of customization. The agent font
size was matching the UI font size previously alredy, which makes it
easier to change it for most scenarios.

Also cleans up some related logic around modifying the font sizes.

Release Notes:

- The agent panel font size will now inherit the UI font size by default
if not set in your settings.
This commit is contained in:
Finn Evers 2025-08-16 16:35:06 +02:00 committed by GitHub
parent 36184a71df
commit 7b3fe0a474
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 55 additions and 54 deletions

View file

@ -716,9 +716,7 @@ fn register_actions(
.insert(theme::clamp_font_size(ui_font_size).0);
});
} else {
theme::adjust_ui_font_size(cx, |size| {
*size += px(1.0);
});
theme::adjust_ui_font_size(cx, |size| size + px(1.0));
}
}
})
@ -733,9 +731,7 @@ fn register_actions(
.insert(theme::clamp_font_size(ui_font_size).0);
});
} else {
theme::adjust_ui_font_size(cx, |size| {
*size -= px(1.0);
});
theme::adjust_ui_font_size(cx, |size| size - px(1.0));
}
}
})
@ -763,9 +759,7 @@ fn register_actions(
.insert(theme::clamp_font_size(buffer_font_size).0);
});
} else {
theme::adjust_buffer_font_size(cx, |size| {
*size += px(1.0);
});
theme::adjust_buffer_font_size(cx, |size| size + px(1.0));
}
}
})
@ -781,9 +775,7 @@ fn register_actions(
.insert(theme::clamp_font_size(buffer_font_size).0);
});
} else {
theme::adjust_buffer_font_size(cx, |size| {
*size -= px(1.0);
});
theme::adjust_buffer_font_size(cx, |size| size - px(1.0));
}
}
})