Set Attrs::monospaced if Font::Monospace is selected
This commit is contained in:
parent
dd80772da9
commit
7d4c63d411
1 changed files with 12 additions and 9 deletions
|
|
@ -350,16 +350,19 @@ impl<'a> Cache<'a> {
|
|||
);
|
||||
buffer.set_text(
|
||||
key.content,
|
||||
glyphon::Attrs::new().family(to_family(key.font)).color({
|
||||
let [r, g, b, a] = key.color.into_linear();
|
||||
glyphon::Attrs::new()
|
||||
.family(to_family(key.font))
|
||||
.color({
|
||||
let [r, g, b, a] = key.color.into_linear();
|
||||
|
||||
glyphon::Color::rgba(
|
||||
(r * 255.0) as u8,
|
||||
(g * 255.0) as u8,
|
||||
(b * 255.0) as u8,
|
||||
(a * 255.0) as u8,
|
||||
)
|
||||
}),
|
||||
glyphon::Color::rgba(
|
||||
(r * 255.0) as u8,
|
||||
(g * 255.0) as u8,
|
||||
(b * 255.0) as u8,
|
||||
(a * 255.0) as u8,
|
||||
)
|
||||
})
|
||||
.monospaced(matches!(key.font, Font::Monospace)),
|
||||
);
|
||||
|
||||
let _ = entry.insert(buffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue