settings ui: Use font picker element from onboarding instead of editor for font components (#39593)
The font picker from onboarding is a lot friendlier to interact with and makes it impossible for a user to select an invalid font from the settings ui. I also moved the font picker from the onboarding crate to the ui_input crate ## New Look <img width="1136" height="812" alt="image" src="https://github.com/user-attachments/assets/7436682c-6a41-4860-a18b-13e15b8f3f31" /> Release Notes: - N/A
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use collections::{HashMap, IndexMap};
|
||||
use gpui::{FontFallbacks, FontFeatures, FontStyle, FontWeight};
|
||||
use gpui::{FontFallbacks, FontFeatures, FontStyle, FontWeight, SharedString};
|
||||
use schemars::{JsonSchema, JsonSchema_repr};
|
||||
use serde::{Deserialize, Deserializer, Serialize};
|
||||
use serde_json::Value;
|
||||
@@ -237,6 +237,18 @@ impl AsRef<str> for FontFamilyName {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<SharedString> for FontFamilyName {
|
||||
fn from(value: SharedString) -> Self {
|
||||
Self(Arc::from(value))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<FontFamilyName> for SharedString {
|
||||
fn from(value: FontFamilyName) -> Self {
|
||||
SharedString::new(value.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<String> for FontFamilyName {
|
||||
fn from(value: String) -> Self {
|
||||
Self(Arc::from(value))
|
||||
|
||||
Reference in New Issue
Block a user