Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
assistant: Initialize the UI font in the prompt library window (#12701)
Marshall Bowers29d29f5a90c1
diff --git a/crates/assistant/src/prompt_library.rs b/crates/assistant/src/prompt_library.rsindex 7352e2a06e4..0c96d0edb29 100644--- a/crates/assistant/src/prompt_library.rs+++ b/crates/assistant/src/prompt_library.rs@@ -23,12 +23,14 @@ use parking_lot::RwLock;use picker::{Picker, PickerDelegate};use rope::Rope;use serde::{Deserialize, Serialize};+use settings::Settings;use std::{future::Future,path::PathBuf,sync::{atomic::AtomicBool, Arc},time::Duration,};+use theme::ThemeSettings;use ui::{div, prelude::*, IconButtonShape, ListHeader, ListItem, ListItemSpacing, ListSubHeader,ParentElement, Render, SharedString, Styled, TitleBar, Tooltip, ViewContext, VisualContext,@@ -848,6 +850,14 @@ impl PromptLibrary {impl Render for PromptLibrary {fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {+ let (ui_font, ui_font_size) = {+ let theme_settings = ThemeSettings::get_global(cx);+ (theme_settings.ui_font.clone(), theme_settings.ui_font_size)+ };++ let theme = cx.theme().clone();+ cx.set_rem_size(ui_font_size);+h_flex().id("prompt-manager").key_context("PromptLibrary")@@ -858,6 +868,8 @@ impl Render for PromptLibrary {})).size_full().overflow_hidden()+ .font(ui_font)+ .text_color(theme.colors().text).child(self.render_prompt_list(cx)).child(self.render_active_prompt(cx))}