A simple CPU rendered GUI IDE experience.
Diffstat (limited to 'src/sym.rs')
-rw-r--r--src/sym.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sym.rs b/src/sym.rs
index 5882491..bbd0651 100644
--- a/src/sym.rs
+++ b/src/sym.rs
@@ -124,7 +124,7 @@ fn r(
) {
let bg = if selected { col!("#262d3b") } else { col!("#1c212b") };
- let ds: Style = Style { bg: bg, color: FG, flags: 0 };
+ let ds: Style = Style::new(FG, bg);
let d: Cell = Cell { letter: None, style: ds };
let mut b = vec![d; c];
const MAP: [([u8; 3], [u8; 3], &str); 70] = {
@@ -158,7 +158,7 @@ fn r(
};
let (bgt, col, ty) = MAP[x.kind.0 as usize];
b.iter_mut().zip(ty.chars()).for_each(|(x, c)| {
- *x = Style { bg: bgt, color: col, flags: Style::BOLD }.basic(c)
+ *x = (Style::new(col, bgt) | Style::BOLD).basic(c)
});
let i = &mut b[2..];
let qualifier = x
@@ -189,14 +189,14 @@ fn r(
i.iter_mut()
.rev()
.zip(q.map(|x| {
- Style { bg, color: color_("#979794"), ..default() }.basic(x)
+ Style { bg, fg: color_("#979794"), ..default() }.basic(x)
}))
.for_each(|(a, b)| *a = b);
// i.iter_mut()
// .rev()
// .zip(loc.map(|x| {
- // Style { bg, color: color_("#979794"), ..default() }
+ // Style { bg, fg: color_("#979794"), ..default() }
// .basic(x)
// }))
// .for_each(|(a, b)| *a = b);
@@ -212,7 +212,7 @@ fn r(
.map(|x| {
Style {
bg,
- color: color_("#858685"),
+ fg: color_("#858685"),
..default()
}
.basic(x)