From 28401e68a5c9930d666df8a2e760dd451634ce15 Mon Sep 17 00:00:00 2001 From: Maciej Janicki Date: Fri, 19 Nov 2021 13:42:03 +0100 Subject: [PATCH] [BH-1215] Fix top clocks Fix top clocks --- .../windows/BGSoundsProgressWindow.cpp | 1 + .../windows/MeditationRunningWindow.cpp | 1 + .../presenter/PowerNapProgressPresenter.cpp | 1 - .../windows/PowerNapProgressWindow.cpp | 2 ++ 4 files changed, 4 insertions(+), 1 deletion(-) 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 c900e4dde28f3f60439cb82efc652bf4d11a6a0b..10fd6156833a42c6695b16f94ddace640d607a62 100644 --- a/products/BellHybrid/apps/application-bell-background-sounds/windows/BGSoundsProgressWindow.cpp +++ b/products/BellHybrid/apps/application-bell-background-sounds/windows/BGSoundsProgressWindow.cpp @@ -105,6 +105,7 @@ 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 eb97b1684272f0bb6a5317d42f67c8bf806b0a84..cd113fe064da979fc492df600ab366c82f700cab 100644 --- a/products/BellHybrid/apps/application-bell-meditation-timer/windows/MeditationRunningWindow.cpp +++ b/products/BellHybrid/apps/application-bell-meditation-timer/windows/MeditationRunningWindow.cpp @@ -96,6 +96,7 @@ 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 { diff --git a/products/BellHybrid/apps/application-bell-powernap/presenter/PowerNapProgressPresenter.cpp b/products/BellHybrid/apps/application-bell-powernap/presenter/PowerNapProgressPresenter.cpp index 38b4f2ffa42f8024199cde24c380201740c95fb6..2d397615f7d651051dabde9f2f730ca9e0d37ff1 100644 --- a/products/BellHybrid/apps/application-bell-powernap/presenter/PowerNapProgressPresenter.cpp +++ b/products/BellHybrid/apps/application-bell-powernap/presenter/PowerNapProgressPresenter.cpp @@ -43,7 +43,6 @@ namespace app::powernap void PowerNapProgressPresenter::activate() { Expects(timer != nullptr); - getView()->setTimeFormat(timeModel->getTimeFormat()); const auto value = settings->getValue(powernapDBRecordName); timer->reset(std::chrono::minutes{utils::getNumericValue(value)}); timer->start(); diff --git a/products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.cpp b/products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.cpp index 29f5842777f9ba3ea36e23175a4b6376517bd276..e362083b7b822e9ca79497ca7458d119341cc1fb 100644 --- a/products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.cpp +++ b/products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.cpp @@ -65,6 +65,7 @@ namespace gui void PowerNapProgressWindow::buildInterface() { AppWindow::buildInterface(); + buildLayout(); configureTimer(); presenter->activate(); @@ -83,6 +84,7 @@ 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 {