change default font to regular

it's readable enough without having to go to bold
This commit is contained in:
bunnie 2025-11-27 12:35:28 +08:00
parent bc4e459e28
commit cd769d4969
2 changed files with 7 additions and 7 deletions

View file

@ -434,7 +434,7 @@ fn main() -> ! {
vault_ui.redraw(); vault_ui.redraw();
} }
_ => { _ => {
log::debug!("unhandled key {}", k); log::trace!("unhandled key {}", k);
} }
} }
} }

View file

@ -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);