pub struct ThemeConfig {
pub is_default: bool,
pub name: SharedString,
pub mode: ThemeMode,
pub font_size: Option<f32>,
pub font_family: Option<SharedString>,
pub mono_font_family: Option<SharedString>,
pub mono_font_size: Option<f32>,
pub radius: Option<usize>,
pub radius_lg: Option<usize>,
pub shadow: Option<bool>,
pub colors: ThemeConfigColors,
pub highlight: Option<HighlightThemeStyle>,
}Fields§
§is_default: boolWhether this theme is the default theme.
name: SharedStringThe name of the theme.
mode: ThemeModeThe mode of the theme, default is light.
font_size: Option<f32>The base font size, default is 16.
font_family: Option<SharedString>The base font family, default is system font: .SystemUIFont.
mono_font_family: Option<SharedString>The monospace font family, default is platform specific:
- macOS:
Menlo - Windows:
Consolas - Linux:
DejaVu Sans Mono
The default falls back to an installed monospace font, then to
.SystemUIFont, when the machine lacks it. A family named here is used
as-is, so name one that is installed or embedded with add_fonts.
mono_font_size: Option<f32>The monospace font size, default is 13.
radius: Option<usize>The border radius for general elements, default is 6.
radius_lg: Option<usize>The border radius for large elements like Dialogs and Notifications, default is 8.
shadow: Option<bool>Set shadows in the theme, for example the Input and Button, default is true.
colors: ThemeConfigColorsThe colors of the theme.
highlight: Option<HighlightThemeStyle>The highlight theme, this part is combilbility with style section in Zed theme.
https://github.com/zed-industries/zed/blob/f50041779dcfd7a76c8aec293361c60c53f02d51/assets/themes/ayu/ayu.json#L9
Trait Implementations§
Source§impl Clone for ThemeConfig
impl Clone for ThemeConfig
Source§fn clone(&self) -> ThemeConfig
fn clone(&self) -> ThemeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ThemeConfig
impl Debug for ThemeConfig
Source§impl Default for ThemeConfig
impl Default for ThemeConfig
Source§fn default() -> ThemeConfig
fn default() -> ThemeConfig
Source§impl<'de> Deserialize<'de> for ThemeConfigwhere
ThemeConfig: Default,
impl<'de> Deserialize<'de> for ThemeConfigwhere
ThemeConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ThemeConfig
impl JsonSchema for ThemeConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ThemeConfig
impl RefUnwindSafe for ThemeConfig
impl Send for ThemeConfig
impl Sync for ThemeConfig
impl Unpin for ThemeConfig
impl UnsafeUnpin for ThemeConfig
impl UnwindSafe for ThemeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().