From db3755545dab5e2b03072ff5b8fce6e869babefb Mon Sep 17 00:00:00 2001 From: Tigran Soghbatyan Date: Mon, 22 Nov 2021 15:30:15 +0100 Subject: [PATCH] [BH-1225] Fix incorrect clock display Fix display of a clock time (missing hour) in applications --- .../windows/BGSoundsProgressWindow.cpp | 2 +- .../windows/MeditationRunningWindow.cpp | 3 ++- .../windows/PowerNapProgressWindow.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/products/BellHybrid/apps/application-bell-background-sounds/windows/BGSoundsProgressWindow.cpp b/products/BellHybrid/apps/application-bell-background-sounds/windows/BGSoundsProgressWindow.cpp index a277dbeb13d2b20f5dda36a3726e984d1617f03f..e2ae98b27d2e9b8c2d5cae36eb1db9fa8eacf157 100644 --- a/products/BellHybrid/apps/application-bell-background-sounds/windows/BGSoundsProgressWindow.cpp +++ b/products/BellHybrid/apps/application-bell-background-sounds/windows/BGSoundsProgressWindow.cpp @@ -76,6 +76,7 @@ namespace gui void BGSoundsProgressWindow::onBeforeShow(ShowMode mode, SwitchData *data) { presenter->onBeforeShow(); + updateTime(); if (mode == ShowMode::GUI_SHOW_RETURN && presenter->isPaused()) { presenter->resume(); @@ -107,7 +108,6 @@ namespace gui progressBar = createProgress(vBox); timerText = createTimer(body->lastBox); time = createClock(body->firstBox); - updateTime(); body->firstBox->resizeItems(); vBox->resizeItems(); diff --git a/products/BellHybrid/apps/application-bell-meditation-timer/windows/MeditationRunningWindow.cpp b/products/BellHybrid/apps/application-bell-meditation-timer/windows/MeditationRunningWindow.cpp index 64282892aa106d46d0677cfe7d03965f0626c17f..3830e8aee14c8f038e48c7590fc9cf47bc467e5d 100644 --- a/products/BellHybrid/apps/application-bell-meditation-timer/windows/MeditationRunningWindow.cpp +++ b/products/BellHybrid/apps/application-bell-meditation-timer/windows/MeditationRunningWindow.cpp @@ -96,7 +96,6 @@ namespace gui time = new BellStatusClock(body->firstBox); time->setMaximumSize(body->firstBox->getWidth(), body->firstBox->getHeight()); time->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Top)); - updateTime(); body->firstBox->resizeItems(); dimensionChangedCallback = [&](Item &, const BoundingBox &newDim) -> bool { @@ -109,6 +108,8 @@ namespace gui { AppWindow::onBeforeShow(mode, data); presenter->onBeforeShow(); + updateTime(); + if (mode == ShowMode::GUI_SHOW_INIT) { playGong(); presenter->start(); diff --git a/products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.cpp b/products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.cpp index 73397d4d4ee8af63703c462ab4b9ac5ced98cd6a..9181ce36df192cd1d1a4ed8616deab669cb0592e 100644 --- a/products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.cpp +++ b/products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.cpp @@ -84,7 +84,6 @@ namespace gui time = new BellStatusClock(body->firstBox); time->setMaximumSize(body->firstBox->getWidth(), body->firstBox->getHeight()); time->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Top)); - updateTime(); body->firstBox->resizeItems(); dimensionChangedCallback = [&](Item &, const BoundingBox &newDim) -> bool { @@ -145,5 +144,6 @@ namespace gui void PowerNapProgressWindow::onBeforeShow(ShowMode mode, SwitchData *data) { presenter->onBeforeShow(); + updateTime(); } } // namespace gui