mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-13 16:42:50 +02:00
docs(schema): ensure every enum variant has a renderable title
This commit is contained in:
@@ -571,6 +571,7 @@ impl From<Position> for Pos2 {
|
||||
/// Komorebi bar theme
|
||||
pub enum KomobarTheme {
|
||||
/// Theme from catppuccin-egui
|
||||
#[cfg_attr(feature = "schemars", schemars(title = "Catppuccin"))]
|
||||
Catppuccin {
|
||||
/// Name of the Catppuccin theme (theme previews: https://github.com/catppuccin/catppuccin)
|
||||
name: komorebi_themes::Catppuccin,
|
||||
@@ -582,6 +583,7 @@ pub enum KomobarTheme {
|
||||
auto_select_text: Option<komorebi_themes::CatppuccinValue>,
|
||||
},
|
||||
/// Theme from base16-egui-themes
|
||||
#[cfg_attr(feature = "schemars", schemars(title = "Base16"))]
|
||||
Base16 {
|
||||
/// Name of the Base16 theme (theme previews: https://tinted-theming.github.io/tinted-gallery/)
|
||||
name: komorebi_themes::Base16,
|
||||
@@ -593,6 +595,7 @@ pub enum KomobarTheme {
|
||||
auto_select_text: Option<komorebi_themes::Base16Value>,
|
||||
},
|
||||
/// Custom Base16 theme
|
||||
#[cfg_attr(feature = "schemars", schemars(title = "Custom"))]
|
||||
Custom {
|
||||
/// Colours of the custom Base16 theme palette
|
||||
colours: Box<komorebi_themes::Base16ColourPalette>,
|
||||
@@ -669,9 +672,10 @@ pub enum DisplayFormat {
|
||||
}
|
||||
|
||||
macro_rules! extend_enum {
|
||||
($existing_enum:ident, $new_enum:ident, { $($(#[$meta:meta])* $variant:ident),* $(,)? }) => {
|
||||
($(#[$type_meta:meta])* $existing_enum:ident, $new_enum:ident, { $($(#[$meta:meta])* $variant:ident),* $(,)? }) => {
|
||||
#[derive(Copy, Clone, Debug, serde::Serialize, serde::Deserialize, PartialEq)]
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
$(#[$type_meta])*
|
||||
pub enum $new_enum {
|
||||
// Add new variants
|
||||
$(
|
||||
@@ -692,7 +696,9 @@ macro_rules! extend_enum {
|
||||
};
|
||||
}
|
||||
|
||||
extend_enum!(DisplayFormat, WorkspacesDisplayFormat, {
|
||||
extend_enum!(
|
||||
/// Workspaces display format
|
||||
DisplayFormat, WorkspacesDisplayFormat, {
|
||||
/// Show all icons only
|
||||
AllIcons,
|
||||
/// Show both all icons and text
|
||||
|
||||
Reference in New Issue
Block a user