M harmony_changelog.md => harmony_changelog.md +2 -0
@@ 15,6 15,8 @@
### Changed / Improved
* Updated button handling during pre-wake up
* Updated the countdown timer in Meditation app according to the new design
+* Updated the countdown timer in Power nap app according to the new design
+* Updated the countdown timer in Relaxation app according to the new design
## [2.6.1 2024-04-02]
M products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.cpp => products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.cpp +7 -4
@@ 1,4 1,4 @@
-// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "PowerNapProgressWindow.hpp"
@@ 67,9 67,12 @@ namespace gui
clock->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Center));
clock->setMargins(gui::Margins(0, progressStyle::clock::marginTop, 0, 0));
- timer =
- new gui::TimeFixedWidget(mainVBox, 0, 0, progressStyle::timer::maxSizeX, progressStyle::timer::maxSizeY);
- timer->setFontAndDimensions(progressStyle::timer::font);
+ timer = new TimeMinuteSecondWidget(mainVBox,
+ 0,
+ 0,
+ progressStyle::timer::maxSizeX,
+ progressStyle::timer::maxSizeY,
+ TimeMinuteSecondWidget::DisplayType::OnlyMinutes);
timer->setMinimumSize(progressStyle::timer::maxSizeX, progressStyle::timer::maxSizeY);
timer->setMargins(gui::Margins(0, progressStyle::timer::marginTop, 0, 0));
timer->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Center));
M products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.hpp => products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.hpp +10 -10
@@ 1,11 1,11 @@
-// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include "presenter/PowerNapProgressPresenter.hpp"
#include <apps-common/widgets/BarGraph.hpp>
-#include <apps-common/widgets/TimeFixedWidget.hpp>
+#include <apps-common/widgets/TimeMinuteSecondWidget.hpp>
#include <common/widgets/BellStatusClock.hpp>
#include <gui/widgets/Icon.hpp>
#include <AppWindow.hpp>
@@ 32,15 32,15 @@ namespace gui
private:
std::shared_ptr<app::powernap::PowerNapProgressContract::Presenter> presenter;
- gui::VBox *mainVBox = nullptr;
- gui::ArcProgressBar *progress = nullptr;
- gui::TimeFixedWidget *timer = nullptr;
- gui::BellStatusClock *clock = nullptr;
- gui::Icon *iconPause = nullptr;
- gui::Icon *iconRing = nullptr;
+ VBox *mainVBox{nullptr};
+ ArcProgressBar *progress{nullptr};
+ TimeMinuteSecondWidget *timer{nullptr};
+ BellStatusClock *clock{nullptr};
+ Icon *iconPause{nullptr};
+ Icon *iconRing{nullptr};
- void setTime(std::time_t newTime);
- void setTimeFormat(utils::time::Locale::TimeFormat fmt);
+ void setTime(std::time_t newTime) override;
+ void setTimeFormat(utils::time::Locale::TimeFormat fmt) override;
RefreshModes updateTime() override;
void buildLayout();
void configureTimer();
M products/BellHybrid/apps/application-bell-relaxation/windows/RelaxationRunningProgressWindow.cpp => products/BellHybrid/apps/application-bell-relaxation/windows/RelaxationRunningProgressWindow.cpp +6 -2
@@ 70,8 70,12 @@ namespace gui
clock->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Center));
clock->setMargins(Margins(0, relStyle::clock::marginTop, 0, 0));
- timer = new TimeFixedWidget(mainVBox, 0, 0, relStyle::timer::maxSizeX, relStyle::timer::maxSizeY);
- timer->setFontAndDimensions(relStyle::timer::font);
+ timer = new TimeMinuteSecondWidget(mainVBox,
+ 0,
+ 0,
+ relStyle::timer::maxSizeX,
+ relStyle::timer::maxSizeY,
+ TimeMinuteSecondWidget::DisplayType::OnlyMinutes);
timer->setMinimumSize(relStyle::timer::maxSizeX, relStyle::timer::maxSizeY);
timer->setMargins(Margins(0, relStyle::timer::marginTop, 0, 0));
timer->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Center));
M products/BellHybrid/apps/application-bell-relaxation/windows/RelaxationRunningProgressWindow.hpp => products/BellHybrid/apps/application-bell-relaxation/windows/RelaxationRunningProgressWindow.hpp +7 -7
@@ 1,4 1,4 @@
-// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
@@ 8,7 8,7 @@
#include <AppWindow.hpp>
#include <apps-common/widgets/BarGraph.hpp>
-#include <apps-common/widgets/TimeFixedWidget.hpp>
+#include <apps-common/widgets/TimeMinuteSecondWidget.hpp>
#include <common/widgets/BellStatusClock.hpp>
#include <gui/widgets/Icon.hpp>
@@ 26,11 26,11 @@ namespace gui
std::unique_ptr<app::relaxation::RelaxationRunningProgressContract::Presenter> presenter;
std::unique_ptr<RelaxationAudioContext> audioContext;
- gui::VBox *mainVBox = nullptr;
- gui::ArcProgressBar *progress = nullptr;
- gui::TimeFixedWidget *timer = nullptr;
- gui::Icon *icon = nullptr;
- gui::BellStatusClock *clock = nullptr;
+ VBox *mainVBox{nullptr};
+ ArcProgressBar *progress{nullptr};
+ TimeMinuteSecondWidget *timer{nullptr};
+ Icon *icon{nullptr};
+ BellStatusClock *clock{nullptr};
void setTime(std::time_t newTime) override;
void setTimeFormat(utils::time::Locale::TimeFormat fmt) override;