mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 14:51:04 +02:00
refactor: enum/struct formatting
This commit is contained in:
parent
708118d266
commit
9cb1dfc1b1
3 changed files with 5 additions and 5 deletions
|
@ -206,7 +206,7 @@ pub enum ModuleJustification {
|
||||||
Left,
|
Left,
|
||||||
Right,
|
Right,
|
||||||
Center,
|
Center,
|
||||||
Fill
|
Fill,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<ModuleJustification> for Justification {
|
impl From<ModuleJustification> for Justification {
|
||||||
|
@ -215,7 +215,7 @@ impl From<ModuleJustification> for Justification {
|
||||||
ModuleJustification::Left => Self::Left,
|
ModuleJustification::Left => Self::Left,
|
||||||
ModuleJustification::Right => Self::Right,
|
ModuleJustification::Right => Self::Right,
|
||||||
ModuleJustification::Center => Self::Center,
|
ModuleJustification::Center => Self::Center,
|
||||||
ModuleJustification::Fill => Self::Fill
|
ModuleJustification::Fill => Self::Fill,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ pub struct ClockModule {
|
||||||
/// <br>
|
/// <br>
|
||||||
/// **Default**: `left`
|
/// **Default**: `left`
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
justify: ModuleJustification
|
justify: ModuleJustification,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for ClockModule {
|
impl Default for ClockModule {
|
||||||
|
@ -79,7 +79,7 @@ impl Default for ClockModule {
|
||||||
locale: default_locale(),
|
locale: default_locale(),
|
||||||
orientation: ModuleOrientation::Horizontal,
|
orientation: ModuleOrientation::Horizontal,
|
||||||
common: Some(CommonConfig::default()),
|
common: Some(CommonConfig::default()),
|
||||||
justify: ModuleJustification::Left
|
justify: ModuleJustification::Left,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ pub struct LabelWidget {
|
||||||
/// <br>
|
/// <br>
|
||||||
/// **Default**: `left`
|
/// **Default**: `left`
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
justify: ModuleJustification
|
justify: ModuleJustification,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CustomWidget for LabelWidget {
|
impl CustomWidget for LabelWidget {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue