mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-19 10:29:35 +03:00
theme: Change autocomplete value for ui_font_features
and buffer_font_features
(#16466)
This PR changes the default value used when autocompleting the `ui_font_features` and `ui_font_features` settings from `null` to `{}`. Release Notes: - N/A
This commit is contained in:
parent
4dec7806cb
commit
0bea4d5fa6
@ -249,6 +249,7 @@ pub struct ThemeSettingsContent {
|
|||||||
pub ui_font_fallbacks: Option<Vec<String>>,
|
pub ui_font_fallbacks: Option<Vec<String>>,
|
||||||
/// The OpenType features to enable for text in the UI.
|
/// The OpenType features to enable for text in the UI.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
#[schemars(default = "default_font_features")]
|
||||||
pub ui_font_features: Option<FontFeatures>,
|
pub ui_font_features: Option<FontFeatures>,
|
||||||
/// The weight of the UI font in CSS units from 100 to 900.
|
/// The weight of the UI font in CSS units from 100 to 900.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
@ -270,6 +271,7 @@ pub struct ThemeSettingsContent {
|
|||||||
pub buffer_line_height: Option<BufferLineHeight>,
|
pub buffer_line_height: Option<BufferLineHeight>,
|
||||||
/// The OpenType features to enable for rendering in text buffers.
|
/// The OpenType features to enable for rendering in text buffers.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
#[schemars(default = "default_font_features")]
|
||||||
pub buffer_font_features: Option<FontFeatures>,
|
pub buffer_font_features: Option<FontFeatures>,
|
||||||
/// The name of the Zed theme to use.
|
/// The name of the Zed theme to use.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
@ -288,6 +290,10 @@ pub struct ThemeSettingsContent {
|
|||||||
pub theme_overrides: Option<ThemeStyleContent>,
|
pub theme_overrides: Option<ThemeStyleContent>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn default_font_features() -> Option<FontFeatures> {
|
||||||
|
Some(FontFeatures::default())
|
||||||
|
}
|
||||||
|
|
||||||
impl ThemeSettingsContent {
|
impl ThemeSettingsContent {
|
||||||
/// Sets the theme for the given appearance to the theme with the specified name.
|
/// Sets the theme for the given appearance to the theme with the specified name.
|
||||||
pub fn set_theme(&mut self, theme_name: String, appearance: Appearance) {
|
pub fn set_theme(&mut self, theme_name: String, appearance: Appearance) {
|
||||||
|
Loading…
Reference in New Issue
Block a user