mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
change default font to regular
it's readable enough without having to go to bold
This commit is contained in:
parent
bc4e459e28
commit
cd769d4969
2 changed files with 7 additions and 7 deletions
|
|
@ -434,7 +434,7 @@ fn main() -> ! {
|
||||||
vault_ui.redraw();
|
vault_ui.redraw();
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
log::debug!("unhandled key {}", k);
|
log::trace!("unhandled key {}", k);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use xous::CID;
|
||||||
use crate::storage::{ContentKind, Manager};
|
use crate::storage::{ContentKind, Manager};
|
||||||
use crate::*;
|
use crate::*;
|
||||||
|
|
||||||
pub const DEFAULT_FONT: GlyphStyle = GlyphStyle::Bold;
|
pub const DEFAULT_FONT: GlyphStyle = GlyphStyle::Regular;
|
||||||
pub const FONT_LIST: [&'static str; 6] = ["regular", "tall", "mono", "bold", "large", "small"];
|
pub const FONT_LIST: [&'static str; 6] = ["regular", "tall", "mono", "bold", "large", "small"];
|
||||||
pub fn name_to_style(name: &str) -> Option<GlyphStyle> {
|
pub fn name_to_style(name: &str) -> Option<GlyphStyle> {
|
||||||
match name {
|
match name {
|
||||||
|
|
@ -67,7 +67,7 @@ impl TotpLayout {
|
||||||
|
|
||||||
pub fn list_box() -> Rectangle { Rectangle::new(Point::new(0, 50), Point::new(127, 127)) }
|
pub fn list_box() -> Rectangle { Rectangle::new(Point::new(0, 50), Point::new(127, 127)) }
|
||||||
|
|
||||||
pub fn list_font() -> GlyphStyle { GlyphStyle::Bold }
|
pub fn list_font() -> GlyphStyle { GlyphStyle::Regular }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct VaultUi {
|
pub struct VaultUi {
|
||||||
|
|
@ -191,15 +191,15 @@ impl VaultUi {
|
||||||
name_bytes,
|
name_bytes,
|
||||||
String::from_utf8(name_bytes.to_vec())
|
String::from_utf8(name_bytes.to_vec())
|
||||||
);
|
);
|
||||||
name_to_style(&String::from_utf8(name_bytes).unwrap_or("bold".to_string()))
|
name_to_style(&String::from_utf8(name_bytes).unwrap_or("regular".to_string()))
|
||||||
.unwrap_or(GlyphStyle::Bold)
|
.unwrap_or(GlyphStyle::Regular)
|
||||||
}
|
}
|
||||||
Err(_) => GlyphStyle::Bold,
|
Err(_) => GlyphStyle::Regular,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
log::warn!("PDDB access error reading default glyph size");
|
log::warn!("PDDB access error reading default glyph size");
|
||||||
GlyphStyle::Bold
|
GlyphStyle::Regular
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
self.totp_list.style(style);
|
self.totp_list.style(style);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue