theme: add separate bar_height setting
This commit is contained in:
parent
3933eba30c
commit
01f9c094ee
12 changed files with 97 additions and 36 deletions
|
|
@ -195,6 +195,7 @@ pub struct Theme {
|
|||
pub highlight_color: Option<Color>,
|
||||
pub border_width: Option<i32>,
|
||||
pub title_height: Option<i32>,
|
||||
pub bar_height: Option<i32>,
|
||||
pub font: Option<String>,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ impl Parser for ThemeParser<'_> {
|
|||
highlight_color,
|
||||
border_width,
|
||||
title_height,
|
||||
bar_height,
|
||||
font,
|
||||
),
|
||||
) = ext.extract((
|
||||
|
|
@ -81,6 +82,7 @@ impl Parser for ThemeParser<'_> {
|
|||
opt(val("highlight-color")),
|
||||
recover(opt(s32("border-width"))),
|
||||
recover(opt(s32("title-height"))),
|
||||
recover(opt(s32("bar-height"))),
|
||||
recover(opt(str("font"))),
|
||||
),
|
||||
))?;
|
||||
|
|
@ -116,6 +118,7 @@ impl Parser for ThemeParser<'_> {
|
|||
highlight_color: color!(highlight_color),
|
||||
border_width: border_width.despan(),
|
||||
title_height: title_height.despan(),
|
||||
bar_height: bar_height.despan(),
|
||||
font: font.map(|f| f.value.to_string()),
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -893,6 +893,7 @@ impl State {
|
|||
}
|
||||
size!(BORDER_WIDTH, border_width);
|
||||
size!(TITLE_HEIGHT, title_height);
|
||||
size!(BAR_HEIGHT, bar_height);
|
||||
if let Some(font) = &theme.font {
|
||||
set_font(font);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue