From c40f8dca7610298b35bb1e4769297fcaa77d9ac5 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sat, 17 Sep 2022 03:41:00 -0400 Subject: do not use nested border boxes to hold calendar item; do not display eventCountdown --- countdown.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/countdown.hs b/countdown.hs index 565e9c3..54f79f5 100755 --- a/countdown.hs +++ b/countdown.hs @@ -240,7 +240,7 @@ countdownWidget isSimulated t = currentEntry = fromMaybe (str "none") $ calendarWidget <$> getCurrentCalendarEntry t nextEntry = fromMaybe (str "none") $ calendarWidget <$> getNextCalendarEntry t - calendarWidget CalendarEntry{..} = vBox [eventCountdown, str "\n", box] + calendarWidget CalendarEntry{..} = box -- vBox [eventCountdown, str "\n", box] where timeUntilActive = (calBeginTime `addLocalTime` yearStart t) `diffLocalTime` t eventCountdown = if timeUntilActive >= 0 then @@ -250,8 +250,10 @@ countdownWidget isSimulated t = hBox [str $ showTime (-timeUntilActive) ++ " ago", padLeft Max $ str $ showCosmicTime (-timeUntilActive) ++ " ago"] years = fromRational $ toCosmicTime calBeginTime - box = borderWithLabel (txt calTitle) $ vBox [ - hCenter $ txtWrap $ calSubtitle, + box = vBox [ + str "\n", + hCenter $ txt calTitle, + hCenter $ txt calSubtitle, str "\n", hBox [ str $ formatTime defaultTimeLocale "%A, %B %e%n%Y-%m-%d %r" $ calBeginTime `addLocalTime` yearStart t, -- cgit v1.2.3