theme: add bar-separator-width setting
This commit is contained in:
parent
f5ed6f8fac
commit
a6e629dd2f
16 changed files with 163 additions and 31 deletions
|
|
@ -209,6 +209,7 @@ pub struct Theme {
|
|||
pub title_font: Option<String>,
|
||||
pub bar_font: Option<String>,
|
||||
pub bar_position: Option<BarPosition>,
|
||||
pub bar_separator_width: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ impl Parser for ThemeParser<'_> {
|
|||
font,
|
||||
title_font,
|
||||
),
|
||||
(bar_font, bar_position_val),
|
||||
(bar_font, bar_position_val, bar_separator_width),
|
||||
) = ext.extract((
|
||||
(
|
||||
opt(val("attention-requested-bg-color")),
|
||||
|
|
@ -92,6 +92,7 @@ impl Parser for ThemeParser<'_> {
|
|||
(
|
||||
recover(opt(str("bar-font"))),
|
||||
recover(opt(str("bar-position"))),
|
||||
recover(opt(s32("bar-separator-width"))),
|
||||
),
|
||||
))?;
|
||||
macro_rules! color {
|
||||
|
|
@ -144,6 +145,7 @@ impl Parser for ThemeParser<'_> {
|
|||
title_font: title_font.map(|f| f.value.to_string()),
|
||||
bar_font: bar_font.map(|f| f.value.to_string()),
|
||||
bar_position,
|
||||
bar_separator_width: bar_separator_width.despan(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -976,6 +976,7 @@ impl State {
|
|||
size!(BORDER_WIDTH, border_width);
|
||||
size!(TITLE_HEIGHT, title_height);
|
||||
size!(BAR_HEIGHT, bar_height);
|
||||
size!(BAR_SEPARATOR_WIDTH, bar_separator_width);
|
||||
macro_rules! font {
|
||||
($fun:ident, $field:ident) => {
|
||||
if let Some(font) = &theme.$field {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue