clock: Use font metrics for size
This commit is contained in:
+5
-2
@@ -111,11 +111,14 @@ impl Widget {
|
||||
.map(|x| x.unwrap())
|
||||
.collect(),
|
||||
)),
|
||||
Widget::Clock { font, font_size } => Some(widgets::clock::Clock::new(
|
||||
Widget::Clock { font, font_size } => match widgets::clock::Clock::new(
|
||||
time,
|
||||
get_font(&font.or_else(|| Some("sans".to_string())).unwrap(), &fonts),
|
||||
font_size,
|
||||
)),
|
||||
) {
|
||||
Ok(w) => Some(w),
|
||||
Err(_) => None,
|
||||
},
|
||||
Widget::Date { font, font_size } => Some(widgets::date::Date::new(
|
||||
time,
|
||||
get_font(&font.or_else(|| Some("sans".to_string())).unwrap(), &fonts),
|
||||
|
||||
Reference in New Issue
Block a user