Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
theme: Clamp font sizes between 6px and 100px (#17829)
Marshall Bowers4d8c3855c229
diff --git a/crates/theme/src/settings.rs b/crates/theme/src/settings.rsindex 5b88d5fcb5b..4d0b4f0215a 100644--- a/crates/theme/src/settings.rs+++ b/crates/theme/src/settings.rs@@ -609,10 +609,14 @@ impl settings::Settings for ThemeSettings {this.apply_theme_overrides();merge(&mut this.ui_font_size, value.ui_font_size.map(Into::into));+ this.ui_font_size = this.ui_font_size.clamp(px(6.), px(100.));+merge(&mut this.buffer_font_size,value.buffer_font_size.map(Into::into),);+ this.buffer_font_size = this.buffer_font_size.clamp(px(6.), px(100.));+merge(&mut this.buffer_line_height, value.buffer_line_height);// Clamp the `unnecessary_code_fade` to ensure text can't disappear entirely.