Fix theme selector resetting the buffer size (#25425)
Closes https://github.com/zed-industries/zed/issues/25413 As the issue points out well, themes do not need to alter any in-memory state on load: that is done via settings file load. Originally, it was introduced in https://github.com/zed-industries/zed/pull/4064 and https://github.com/zed-industries/zed/pull/24857 had restored that behavior, which seems wrong to do. Apart from removing that part, removes unnecessary methods and emphasizes that in-memory state is the Buffer/UI size — no need to add `Adjusted` there as the settings file presence is already enough. Release Notes: - Fixed theme selector resetting the buffer size
This commit is contained in:
parent
822f42e8fe
commit
147f407b7a
5 changed files with 39 additions and 74 deletions
|
@ -59,6 +59,7 @@ const DEFAULT_NUM_COLUMNS: usize = 128;
|
|||
pub fn text_style(window: &mut Window, cx: &mut App) -> TextStyle {
|
||||
let settings = ThemeSettings::get_global(cx).clone();
|
||||
|
||||
let font_size = settings.buffer_font_size(cx).into();
|
||||
let font_family = settings.buffer_font.family;
|
||||
let font_features = settings.buffer_font.features;
|
||||
let font_weight = settings.buffer_font.weight;
|
||||
|
@ -71,7 +72,7 @@ pub fn text_style(window: &mut Window, cx: &mut App) -> TextStyle {
|
|||
font_features,
|
||||
font_weight,
|
||||
font_fallbacks,
|
||||
font_size: theme::get_buffer_font_size(cx).into(),
|
||||
font_size,
|
||||
font_style: FontStyle::Normal,
|
||||
line_height: window.line_height().into(),
|
||||
background_color: Some(theme.colors().terminal_ansi_background),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue