calendar
git clone https://git.lucas.co/cce-calendar.git
Build TextAttrs with ..Default::default()
cce-ui's TextAttrs gains a `stretch` field; ending the literal in
`..Default::default()` keeps this crate compiling against it and
against the currently pinned cce-ui alike, so no repin is needed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/main.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index b9c98d2..d458296 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -611,7 +611,7 @@ impl CalendarApp {
}
fn paint_header(&self, pc: &mut PaintCtx, g: &Geom) {
- let bold = TextAttrs { italic: false, weight: Some(700) };
+ let bold = TextAttrs { italic: false, weight: Some(700), ..Default::default() };
self.paint_header_btn(pc, g.prev_btn, HeaderBtn::Prev, Some("chevron-left"), "Prev");
self.paint_header_btn(pc, g.next_btn, HeaderBtn::Next, Some("chevron-right"), "Next");
let title = Rect {
@@ -675,7 +675,7 @@ impl CalendarApp {
TEXT_FAINT
};
pc.text_boxed(date.day().to_string(), num.x, num.y, 11.5, num_color, None, None,
- TextAttrs { italic: false, weight: Some(600) }, Self::boxed(num, AlignH::Center));
+ TextAttrs { italic: false, weight: Some(600), ..Default::default() }, Self::boxed(num, AlignH::Center));
// Event chips: dot + clipped title, then a "+N" overflow line.
if let Some(events) = self.events.get(&date) {