A art/bell/bell_big_logo_W_G.png => art/bell/bell_big_logo_W_G.png +0 -0
A image/assets/images/bell/bell_big_logo_W_G.vpi => image/assets/images/bell/bell_big_logo_W_G.vpi +0 -0
M image/assets/lang/English.json => image/assets/lang/English.json +4 -1
@@ 571,7 571,6 @@
"tethering_phone_mode_change_prohibited": "<text>Tethering is on.<br /><br />Other modes (Connected, DND,<br />Offline) are overriden by this mode<br />and are not working.</text>",
"tethering_menu_access_decline": "<text>Tethering is on.<br /><br />To access menu,<br />turn tethering off.</text>",
"app_bell_settings_time_units_time_fmt_top_message": "Time format",
- "app_bell_settings_time_units_time_fmt_bottom_message": "hours",
"app_bell_settings_time_units_time_message": "Time",
"app_bell_settings_time_units_finished_message": "Time and units are set.",
"app_bellmain_alarm": "Alarm",
@@ 582,6 581,10 @@
"app_bellmain_settings": "Settings",
"app_bellmain_main_window_title": "Bell Hybrid+",
"app_bell_onboarding_welcome_message": "Mudita Harmony",
+ "app_bell_onboarding_info_rotate": "<text font='gt_pressura' weight='regular' size='38'>Rotate </text><text font='gt_pressura' weight='light' size='38'>to select</text>",
+ "app_bell_onboarding_info_light_click": "<text font='gt_pressura' weight='regular' size='38'>Light click </text><text font='gt_pressura' weight='light' size='38'>to continue</text>",
+ "app_bell_onboarding_info_deep_click_warning": "<text font='gt_pressura' weight='light' size='38'>You've </text><text font='gt_pressura' weight='regular' size='38'>deep pressed</text>",
+ "app_bell_onboarding_info_deep_click_correction": "<text font='gt_pressura' weight='light' size='38'>Be more gentle,<br></br>try </text><text font='gt_pressura' weight='regular' size='38'>light click </text><text font='gt_pressura' weight='light' size='38'>this time</text>",
"app_bell_onboarding_finalize": "<text>Well done!<br />Wake up with joy</text>",
"app_bell_settings_advanced": "Advanced",
"app_bell_settings_advanced_time_units": "Time & units",
M image/assets/lang/Polski.json => image/assets/lang/Polski.json +0 -1
@@ 586,7 586,6 @@
"tethering_phone_mode_change_prohibited": "<text>Tethering włączony.<br /><br />Inne tryby (Połączony, Nie przeszkadzać,<br />Offline) zostały unieważnione przez ten tryb<br />i nie działają.</text>",
"tethering_menu_access_decline": "<text>Tethering włączony.<br /><br />Aby przejść do menu,<br />wyłącz tethering.</text>",
"app_bell_settings_time_units_time_fmt_top_message": "Format czasu",
- "app_bell_settings_time_units_time_fmt_bottom_message": "godziny",
"app_bell_settings_time_units_time_message": "Czas",
"app_bell_settings_time_units_finished_message": "Czas i jednostki ustawione.",
"app_bellmain_alarm": "Alarm",
M module-apps/apps-common/widgets/BellBaseLayout.cpp => module-apps/apps-common/widgets/BellBaseLayout.cpp +3 -2
@@ 29,7 29,7 @@ namespace gui
centerBox = new VBox(this);
centerBox->setEdges(RectangleEdge::None);
centerBox->setAlignment(Alignment(gui::Alignment::Horizontal::Center, gui::Alignment::Vertical::Center));
- centerBox->setMinimumSize(style::bell_base_layout::w, style::bell_base_layout::center_layout_h);
+ centerBox->setMinimumSize(style::bell_base_layout::center_layout_w, style::bell_base_layout::center_layout_h);
lastBox = new VBox(this);
lastBox->setMinimumSize(style::bell_base_layout::outer_layouts_w, style::bell_base_layout::outer_layouts_h);
@@ 94,7 94,8 @@ namespace gui
centerThreeBox->centerBox = new HBox(centerThreeBox);
centerThreeBox->centerBox->setEdges(RectangleEdge::None);
centerThreeBox->centerBox->setAlignment(Alignment(gui::Alignment::Horizontal::Center));
- centerThreeBox->centerBox->setMaximumSize(style::bell_base_layout::w, style::bell_base_layout::center_layout_h);
+ centerThreeBox->centerBox->setMaximumSize(style::bell_base_layout::center_layout_w,
+ style::bell_base_layout::center_layout_h);
centerThreeBox->lastBox = new HBox(centerThreeBox);
centerThreeBox->lastBox->setAlignment(Alignment(Alignment::Vertical::Center));
M module-apps/apps-common/widgets/BellBaseLayout.hpp => module-apps/apps-common/widgets/BellBaseLayout.hpp +1 -1
@@ 14,6 14,7 @@ namespace style::bell_base_layout
constexpr inline auto outer_layouts_w = 390U;
constexpr inline auto outer_layouts_h = 102U;
constexpr inline auto outer_layout_margin = 39U;
+ constexpr inline auto center_layout_w = 504U;
constexpr inline auto center_layout_h = h - 2 * outer_layout_margin - 2 * outer_layouts_h;
enum class ParentType
@@ 21,7 22,6 @@ namespace style::bell_base_layout
SideListView,
Window
};
-
} // namespace style::bell_base_layout
namespace gui
M module-gui/gui/widgets/ListViewWithArrows.cpp => module-gui/gui/widgets/ListViewWithArrows.cpp +8 -5
@@ 86,7 86,7 @@ namespace gui
listOverlay->centerBox->setEdges(RectangleEdge::None);
body = new VBox(listOverlay->centerBox);
- body->setAlignment(Alignment::Vertical::Top);
+ body->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Top));
body->setEdges(RectangleEdge::None);
listOverlay->lastBox = new VBox(listOverlay);
@@ 107,10 107,9 @@ namespace gui
body->setMaximumSize(w, h);
listOverlay->firstBox->setMinimumSize(w, outerLayoutsH);
- listOverlay->firstBox->setMargins(Margins(0, 0, 0, outerLayoutsMargin));
listOverlay->centerBox->setMaximumSize(w, h);
+ listOverlay->centerBox->setMargins(Margins(0, outerLayoutsMargin, 0, outerLayoutsMargin));
listOverlay->lastBox->setMinimumSize(w, outerLayoutsH);
- listOverlay->lastBox->setMargins(Margins(0, outerLayoutsMargin, 0, 0));
widgetBody->resizeItems();
}
@@ 127,7 126,7 @@ namespace gui
titleBody->setEditMode(EditMode::Browse);
titleBody->setText(title);
- body->setAlignment(Alignment(Alignment::Vertical::Top));
+ body->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Top));
listOverlay->firstBox->setVisible(true);
listOverlay->resizeItems();
@@ 145,7 144,11 @@ namespace gui
auto elementsOnPage = listOverlay->centerBox->widgetArea.h / data.elementMinimalSpaceRequired;
if (boundaries == Boundaries::Continuous) {
- if (elementsOnPage < data.elementsCount) {
+ if (elementsOnPage == data.elementsCount) {
+ listOverlay->firstBox->setVisible(true);
+ listOverlay->lastBox->setVisible(false);
+ }
+ else if (elementsOnPage < data.elementsCount) {
listOverlay->firstBox->setVisible(true);
listOverlay->lastBox->setVisible(true);
}
M products/BellHybrid/apps/application-bell-alarm/windows/BellAlarmWindow.cpp => products/BellHybrid/apps/application-bell-alarm/windows/BellAlarmWindow.cpp +1 -1
@@ 38,7 38,7 @@ namespace gui
body = new BellBaseLayout(this, 0, 0, style::window_width, style::window_height);
topText = new Label(body->firstBox);
- topText->setMinimumSize(style::bell_base_layout::w, style::bell_base_layout::outer_layouts_h);
+ topText->setMinimumSize(style::bell_base_layout::outer_layouts_w, style::bell_base_layout::outer_layouts_h);
topText->setText(utils::translate("app_bellmain_alarm"));
topText->setFont(bell_alarm_style::top_text::font);
topText->setEdges(RectangleEdge::None);
M products/BellHybrid/apps/application-bell-background-sounds/windows/BGSoundsTimerSelectWindow.cpp => products/BellHybrid/apps/application-bell-background-sounds/windows/BGSoundsTimerSelectWindow.cpp +2 -2
@@ 99,8 99,8 @@ namespace gui
void BGSoundsTimerSelectWindow::createBottomDescription()
{
bottomDescription = new gui::Text();
- bottomDescription->setMaximumSize(style::bell_base_layout::w, style::bell_base_layout::outer_layouts_h);
- bottomDescription->setMinimumSize(style::bell_base_layout::w, style::bell_base_layout::outer_layouts_h);
+ bottomDescription->setMinimumSize(style::bell_base_layout::outer_layouts_w,
+ style::bell_base_layout::outer_layouts_h);
bottomDescription->setFont(bgSoundsStyle::descriptionFont);
bottomDescription->setEdges(RectangleEdge::All);
bottomDescription->activeItem = false;
M products/BellHybrid/apps/application-bell-onboarding/ApplicationBellOnBoarding.cpp => products/BellHybrid/apps/application-bell-onboarding/ApplicationBellOnBoarding.cpp +122 -1
@@ 7,6 7,7 @@
#include <windows/OnBoardingLanguageWindow.hpp>
#include <windows/OnBoardingFinalizeWindow.hpp>
#include <windows/OnBoardingSettingsWindow.hpp>
+#include <windows/OnBoardingInstructionPromptWindow.hpp>
#include <service-appmgr/Constants.hpp>
#include <service-appmgr/messages/GetCurrentDisplayLanguageResponse.hpp>
@@ 18,6 19,8 @@
#include <application-bell-settings/models/TemperatureUnitModel.hpp>
#include <application-bell-settings/models/TimeUnitsModel.hpp>
#include <application-bell-settings/presenter/TimeUnitsPresenter.hpp>
+#include <Timers/TimerFactory.hpp>
+#include <AppMessage.hpp>
namespace app
{
@@ 44,6 47,12 @@ namespace app
return sys::msgNotHandled();
});
+ informationPromptTimer = sys::TimerFactory::createSingleShotTimer(
+ this,
+ OnBoarding::informationTimerName,
+ OnBoarding::informationPromptTimeout,
+ [this]([[maybe_unused]] sys::Timer &timer) { displayInformation(getCurrentWindow()->getName()); });
+
return sys::ReturnCodes::Success;
}
@@ 75,6 84,11 @@ namespace app
std::make_unique<OnBoarding::OnBoardingFinalizeWindowPresenter>([&]() { finalizeOnBoarding(); });
return std::make_unique<gui::OnBoardingFinalizeWindow>(app, std::move(presenter));
});
+
+ windowsFactory.attach(gui::window::name::informationOnBoardingWindow,
+ [](ApplicationCommon *app, const std::string &name) {
+ return std::make_unique<gui::OnBoardingInstructionPromptWindow>(app, name);
+ });
}
void ApplicationBellOnBoarding::destroyUserInterface()
@@ 88,7 102,22 @@ namespace app
sys::MessagePointer ApplicationBellOnBoarding::DataReceivedHandler(sys::DataMessage *msgl,
sys::ResponseMessage *resp)
{
- auto retMsg = Application::DataReceivedHandler(msgl);
+ auto retMsg = sys::msgNotHandled();
+ // DataReceiveHandler is deprecated so when it will be moved to connect this parts also have to be moved
+ if (msgl->messageType == MessageType::AppInputEvent) {
+ if (!handleInformationOnInputEvent(msgl)) {
+ retMsg = ApplicationCommon::DataReceivedHandler(msgl);
+ }
+ }
+ else if (msgl->messageType == MessageType::AppSwitchWindow) {
+ handleInformationBeforeSwitchWindow(msgl);
+ retMsg = ApplicationCommon::DataReceivedHandler(msgl);
+ handleInformationAfterSwitchWindow();
+ }
+ else {
+ retMsg = Application::DataReceivedHandler(msgl);
+ }
+
if (auto response = dynamic_cast<sys::ResponseMessage *>(retMsg.get());
response != nullptr && response->retCode == sys::ReturnCodes::Success) {
return retMsg;
@@ 101,4 130,96 @@ namespace app
{
bus.sendUnicast(std::make_shared<onBoarding::FinalizeOnBoarding>(), service::name::appmgr);
}
+
+ void ApplicationBellOnBoarding::displayInformation(const std::string &windowToReturn)
+ {
+ auto [icon, text] = getDisplayDataFromState();
+ switchWindow(gui::window::name::informationOnBoardingWindow,
+ gui::BellFinishedWindowData::Factory::create(icon, utils::translate(text), windowToReturn));
+ }
+
+ OnBoarding::InformationDisplay ApplicationBellOnBoarding::getDisplayDataFromState()
+ {
+ switch (informationState) {
+ case OnBoarding::InformationStates::RotateInfo:
+ return {"button_rotate_W_G", "app_bell_onboarding_info_rotate"};
+ case OnBoarding::InformationStates::LightClickInfo:
+ return {"button_light_press_W_G", "app_bell_onboarding_info_light_click"};
+ case OnBoarding::InformationStates::DeepClickWarningInfo:
+ return {"button_deep_press_W_G", "app_bell_onboarding_info_deep_click_warning"};
+ case OnBoarding::InformationStates::DeepClickCorrectionInfo:
+ return {"button_light_press_W_G", "app_bell_onboarding_info_deep_click_correction"};
+ }
+ return {"", ""};
+ }
+
+ bool ApplicationBellOnBoarding::isInformationPromptPermittedOnCurrentWindow()
+ {
+ auto currentWindow = getCurrentWindow()->getName();
+ return (currentWindow != gui::name::window::main_window &&
+ currentWindow != gui::window::name::finalizeOnBoardingWindow &&
+ currentWindow != gui::window::name::informationOnBoardingWindow);
+ }
+
+ void ApplicationBellOnBoarding::startTimerOnWindows()
+ {
+ if (isInformationPromptPermittedOnCurrentWindow()) {
+ informationPromptTimer.start();
+ }
+ }
+
+ void ApplicationBellOnBoarding::handleInformationBeforeSwitchWindow(sys::DataMessage *msgl)
+ {
+ auto msg = static_cast<AppSwitchWindowMessage *>(msgl);
+
+ auto selectedWindowCondition =
+ getCurrentWindow()->getName() == gui::window::name::informationOnBoardingWindow &&
+ msg->getWindowName() == getPrevWindow() &&
+ msg->getSenderWindowName() == gui::window::name::informationOnBoardingWindow;
+
+ if (selectedWindowCondition && informationState == OnBoarding::InformationStates::DeepClickWarningInfo) {
+
+ informationState = OnBoarding::InformationStates::DeepClickCorrectionInfo;
+ displayInformation(msg->getWindowName());
+ informationState = OnBoarding::InformationStates::RotateInfo;
+ }
+ }
+
+ void ApplicationBellOnBoarding::handleInformationAfterSwitchWindow()
+ {
+ startTimerOnWindows();
+ }
+
+ bool ApplicationBellOnBoarding::handleInformationOnInputEvent(sys::DataMessage *msgl)
+ {
+ auto inputEvent = static_cast<AppInputEventMessage *>(msgl)->getEvent();
+
+ if (isInformationPromptPermittedOnCurrentWindow()) {
+ startTimerOnWindows();
+
+ if (inputEvent.isKeyRelease(gui::KeyCode::KEY_UP) || inputEvent.isKeyRelease(gui::KeyCode::KEY_DOWN)) {
+ informationState = OnBoarding::InformationStates::LightClickInfo;
+ }
+ else if (inputEvent.isKeyRelease(gui::KeyCode::KEY_RIGHT)) {
+ informationState = OnBoarding::InformationStates::DeepClickWarningInfo;
+ displayInformation(getCurrentWindow()->getName());
+ }
+ else if (inputEvent.isKeyRelease(gui::KeyCode::KEY_ENTER)) {
+ informationState = OnBoarding::InformationStates::RotateInfo;
+ }
+
+ return false;
+ }
+
+ if (inputEvent.isKeyRelease(gui::KeyCode::KEY_ENTER) &&
+ informationState == OnBoarding::InformationStates::DeepClickWarningInfo) {
+ informationState = OnBoarding::InformationStates::DeepClickCorrectionInfo;
+
+ displayInformation(getPrevWindow());
+ informationState = OnBoarding::InformationStates::RotateInfo;
+ return true;
+ }
+
+ return false;
+ }
} // namespace app
M products/BellHybrid/apps/application-bell-onboarding/CMakeLists.txt => products/BellHybrid/apps/application-bell-onboarding/CMakeLists.txt +2 -1
@@ 16,6 16,7 @@ target_sources(application-bell-onboarding
windows/OnBoardingLanguageWindow.cpp
windows/OnBoardingSettingsWindow.cpp
windows/OnBoardingFinalizeWindow.cpp
+ windows/OnBoardingInstructionPromptWindow.cpp
presenter/OnBoardingLanguageWindowPresenter.cpp
presenter/OnBoardingFinalizeWindowPresenter.cpp
@@ 23,7 24,7 @@ target_sources(application-bell-onboarding
presenter/OnBoardingFinalizeWindowPresenter.hpp
windows/OnBoardingLanguageWindow.hpp
windows/OnBoardingSettingsWindow.hpp
- data/OnBoardingStyle.hpp
+ windows/OnBoardingInstructionPromptWindow.hpp
PUBLIC
include/application-bell-onboarding/ApplicationBellOnBoarding.hpp
D products/BellHybrid/apps/application-bell-onboarding/data/OnBoardingStyle.hpp => products/BellHybrid/apps/application-bell-onboarding/data/OnBoardingStyle.hpp +0 -21
@@ 1,21 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#pragma once
-
-#include <Style.hpp>
-
-namespace gui
-{
- namespace window
- {
- namespace welcome
- {
- inline constexpr auto midline_correction = 40U;
- inline constexpr auto midline_w = 480U;
- inline constexpr auto midline_h = 1U;
- inline constexpr auto sun_logo_margin_top = 10U;
- inline constexpr auto sun_logo_margin_right = 25U;
- } // namespace welcome
- } // namespace window
-} // namespace gui
M products/BellHybrid/apps/application-bell-onboarding/include/application-bell-onboarding/ApplicationBellOnBoarding.hpp => products/BellHybrid/apps/application-bell-onboarding/include/application-bell-onboarding/ApplicationBellOnBoarding.hpp +33 -4
@@ 6,15 6,44 @@
#include "BellOnBoardingNames.hpp"
#include <Application.hpp>
+namespace app::OnBoarding
+{
+ /// Image name, Prompt info text
+ using InformationDisplay = std::pair<std::string, std::string>;
+
+ constexpr auto informationPromptTimeout = std::chrono::seconds{5};
+ constexpr auto informationTimerName = "OnBoardingInformationTimer";
+
+ enum class InformationStates
+ {
+ RotateInfo,
+ LightClickInfo,
+ DeepClickWarningInfo,
+ DeepClickCorrectionInfo
+ };
+} // namespace app::OnBoarding
+
namespace app
{
class ApplicationBellOnBoarding : public Application
{
+ private:
+ OnBoarding::InformationStates informationState = OnBoarding::InformationStates::RotateInfo;
+ sys::TimerHandle informationPromptTimer;
+
+ OnBoarding::InformationDisplay getDisplayDataFromState();
+ void displayInformation(const std::string &windowToReturn);
+ bool isInformationPromptPermittedOnCurrentWindow();
+ void startTimerOnWindows();
+ bool handleInformationOnInputEvent(sys::DataMessage *msgl);
+ void handleInformationBeforeSwitchWindow(sys::DataMessage *msgl);
+ void handleInformationAfterSwitchWindow();
+
public:
- ApplicationBellOnBoarding(std::string name = applicationBellOnBoardingName,
- std::string parent = "",
- StatusIndicators statusIndicators = StatusIndicators{},
- StartInBackground startInBackground = {false});
+ explicit ApplicationBellOnBoarding(std::string name = applicationBellOnBoardingName,
+ std::string parent = "",
+ StatusIndicators statusIndicators = StatusIndicators{},
+ StartInBackground startInBackground = {false});
sys::ReturnCodes InitHandler() override;
sys::MessagePointer DataReceivedHandler(sys::DataMessage *msgl, sys::ResponseMessage *resp) override;
M products/BellHybrid/apps/application-bell-onboarding/include/application-bell-onboarding/BellOnBoardingNames.hpp => products/BellHybrid/apps/application-bell-onboarding/include/application-bell-onboarding/BellOnBoardingNames.hpp +6 -4
@@ 10,8 10,10 @@ namespace app
namespace gui::window::name
{
- inline constexpr auto onBoardingWelcomeWindow = "BellOnBoardingWelcome";
- inline constexpr auto onBoardingLanguageWindow = "BellOnBoardingLanguage";
- inline constexpr auto onBoardingSettingsWindow = "BellOnBoardingSettings";
- inline constexpr auto finalizeOnBoardingWindow = "BellOnBoardingFinalize";
+ inline constexpr auto onBoardingWelcomeWindow = "BellOnBoardingWelcome";
+ inline constexpr auto onBoardingLanguageWindow = "BellOnBoardingLanguage";
+ inline constexpr auto onBoardingSettingsWindow = "BellOnBoardingSettings";
+ inline constexpr auto finalizeOnBoardingWindow = "BellOnBoardingFinalize";
+ inline constexpr auto informationOnBoardingWindow = "BellOnBoardingInformation";
+
} // namespace gui::window::name
M products/BellHybrid/apps/application-bell-onboarding/windows/OnBoardingFinalizeWindow.cpp => products/BellHybrid/apps/application-bell-onboarding/windows/OnBoardingFinalizeWindow.cpp +1 -1
@@ 38,7 38,7 @@ namespace gui
{
BellFinishedWindow::onBeforeShow(mode, data);
- icon->image->set("bell_mudita_logo", ImageTypeSpecifier::W_G);
+ icon->image->set("bell_big_logo", ImageTypeSpecifier::W_G);
icon->text->setRichText(utils::translate("app_bell_onboarding_finalize"));
}
} // namespace gui
A products/BellHybrid/apps/application-bell-onboarding/windows/OnBoardingInstructionPromptWindow.cpp => products/BellHybrid/apps/application-bell-onboarding/windows/OnBoardingInstructionPromptWindow.cpp +36 -0
@@ 0,0 1,36 @@
+// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
+// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
+
+#include "OnBoardingInstructionPromptWindow.hpp"
+
+#include <InputEvent.hpp>
+#include <Icon.hpp>
+#include <Application.hpp>
+
+namespace gui
+{
+ OnBoardingInstructionPromptWindow::OnBoardingInstructionPromptWindow(app::ApplicationCommon *app,
+ const std::string &name)
+ : BellFinishedWindow(app, name)
+ {
+ buildInterface();
+ }
+
+ void OnBoardingInstructionPromptWindow::buildInterface()
+ {
+ BellFinishedWindow::buildInterface();
+
+ icon->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Top));
+ icon->image->setMargins({0, OnBoarding::Information::icon_top_margin, 0, 0});
+ icon->text->setMaximumWidth(OnBoarding::Information::text_w);
+ }
+
+ bool OnBoardingInstructionPromptWindow::onInput(const InputEvent &inputEvent)
+ {
+ if (inputEvent.isShortRelease(KeyCode::KEY_ENTER)) {
+ application->switchWindow(windowToReturn);
+ return true;
+ }
+ return false;
+ }
+} // namespace gui
A products/BellHybrid/apps/application-bell-onboarding/windows/OnBoardingInstructionPromptWindow.hpp => products/BellHybrid/apps/application-bell-onboarding/windows/OnBoardingInstructionPromptWindow.hpp +25 -0
@@ 0,0 1,25 @@
+// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
+// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
+
+#pragma once
+
+#include <common/windows/BellFinishedWindow.hpp>
+
+namespace gui
+{
+ namespace OnBoarding::Information
+ {
+ inline constexpr auto icon_top_margin = 40U;
+ inline constexpr auto text_w = 380U;
+ } // namespace OnBoarding::Information
+
+ class OnBoardingInstructionPromptWindow : public BellFinishedWindow
+ {
+ public:
+ OnBoardingInstructionPromptWindow(app::ApplicationCommon *app, const std::string &name);
+
+ bool onInput(const InputEvent &inputEvent) override;
+ void buildInterface() override;
+ };
+
+} // namespace gui
M products/BellHybrid/apps/application-bell-powernap/data/PowerNapListItem.cpp => products/BellHybrid/apps/application-bell-powernap/data/PowerNapListItem.cpp +2 -1
@@ 55,7 55,8 @@ namespace gui
void PowerNapListItem::createBottomDescription()
{
bottomDescription = new Label(body->lastBox);
- bottomDescription->setMaximumSize(style::bell_base_layout::w, style::bell_base_layout::outer_layouts_h);
+ bottomDescription->setMaximumSize(style::bell_base_layout::outer_layouts_w,
+ style::bell_base_layout::outer_layouts_h);
bottomDescription->setFont(powerNapStyle::descriptionFont);
bottomDescription->setEdges(RectangleEdge::None);
bottomDescription->activeItem = false;
M products/BellHybrid/apps/application-bell-settings/ApplicationBellSettings.cpp => products/BellHybrid/apps/application-bell-settings/ApplicationBellSettings.cpp +2 -2
@@ 57,7 57,7 @@ namespace app
connect(typeid(manager::GetCurrentDisplayLanguageResponse), [&](sys::Message *msg) {
if (gui::window::name::bellSettingsLanguage == getCurrentWindow()->getName()) {
- switchWindow(gui::BellFinishedWindow::defaultName,
+ switchWindow(gui::window::bell_finished::defaultName,
gui::BellFinishedWindowData::Factory::create(
"big_check_W_G",
utils::translate("app_bell_settings_advanced_language_set"),
@@ 106,7 106,7 @@ namespace app
return std::make_unique<gui::BellSettingsFrontlightWindow>(app, std::move(presenter));
});
- windowsFactory.attach(gui::BellFinishedWindow::defaultName,
+ windowsFactory.attach(gui::window::bell_finished::defaultName,
[](ApplicationCommon *app, const std::string &name) {
return std::make_unique<gui::BellFinishedWindow>(app);
});
M products/BellHybrid/apps/application-bell-settings/models/TimeUnitsModel.cpp => products/BellHybrid/apps/application-bell-settings/models/TimeUnitsModel.cpp +2 -7
@@ 44,13 44,8 @@ namespace app::bell_settings
void TimeUnitsModel::createData()
{
- timeFmtSetListItem =
- new gui::TimeFormatSetListItem(0,
- 0,
- 0,
- 0,
- utils::translate("app_bell_settings_time_units_time_fmt_top_message"),
- utils::translate("app_bell_settings_time_units_time_fmt_bottom_message"));
+ timeFmtSetListItem = new gui::TimeFormatSetListItem(
+ 0, 0, 0, 0, utils::translate("app_bell_settings_time_units_time_fmt_top_message"));
internalData.push_back(timeFmtSetListItem);
timeSetListItem =
M products/BellHybrid/apps/application-bell-settings/widgets/TimeFormatSetListItem.hpp => products/BellHybrid/apps/application-bell-settings/widgets/TimeFormatSetListItem.hpp +1 -1
@@ 19,7 19,7 @@ namespace gui
public:
TimeFormatSetListItem() = delete;
TimeFormatSetListItem(
- gui::Length x, gui::Length y, gui::Length w, gui::Length h, const UTF8 &topDesc, const UTF8 &botDesc);
+ gui::Length x, gui::Length y, gui::Length w, gui::Length h, const UTF8 &topDesc, const UTF8 &botDesc = "");
auto getTimeFmt() const noexcept -> utils::time::Locale::TimeFormat;
auto setTimeFmt(utils::time::Locale::TimeFormat fmt) noexcept -> void;
M products/BellHybrid/apps/application-bell-settings/windows/BellSettingsFrontlight.cpp => products/BellHybrid/apps/application-bell-settings/windows/BellSettingsFrontlight.cpp +3 -3
@@ 41,7 41,7 @@ namespace gui
body = new BellBaseLayout(this, 0, 0, style::window_width, style::window_height);
topText = new Label(body->firstBox);
- topText->setMinimumSize(style::bell_base_layout::w, style::bell_base_layout::outer_layouts_h);
+ topText->setMinimumSize(style::bell_base_layout::outer_layouts_w, style::bell_base_layout::outer_layouts_h);
topText->setText(utils::translate("app_bell_settings_frontlight_top_message"));
topText->setFont(bell_settings_style::top_text::font);
topText->setEdges(RectangleEdge::None);
@@ 76,9 76,9 @@ namespace gui
if (inputEvent.isShortRelease(KeyCode::KEY_ENTER)) {
presenter->saveData();
- application->switchWindow(BellFinishedWindow::defaultName,
+ application->switchWindow(window::bell_finished::defaultName,
BellFinishedWindowData::Factory::create(
- "big_check_W_M",
+ "big_check_W_G",
utils::translate("app_bell_settings_frontlight_finished_message"),
window::name::bellSettingsAdvanced));
return true;
M products/BellHybrid/apps/application-bell-settings/windows/BellSettingsWindow.cpp => products/BellHybrid/apps/application-bell-settings/windows/BellSettingsWindow.cpp +0 -1
@@ 20,7 20,6 @@ namespace gui
{
addOptions(settingsOptionsList());
setListTitle(utils::translate("app_bellmain_settings"));
- optionsList->setBoundaries(Boundaries::Continuous);
}
std::list<Option> BellSettingsWindow::settingsOptionsList()
M products/BellHybrid/apps/application-bell-settings/windows/advanced/BellSettingsTimeUnitsWindow.cpp => products/BellHybrid/apps/application-bell-settings/windows/advanced/BellSettingsTimeUnitsWindow.cpp +2 -2
@@ 22,9 22,9 @@ namespace gui
buildInterface();
finishedCallback = [this]() {
- application->switchWindow(BellFinishedWindow::defaultName,
+ application->switchWindow(window::bell_finished::defaultName,
BellFinishedWindowData::Factory::create(
- "big_check_W_M",
+ "big_check_W_G",
utils::translate("app_bell_settings_time_units_finished_message"),
gui::window::name::bellSettingsAdvanced));
};
M products/BellHybrid/apps/application-bell-settings/windows/alarm_settings/BellSettingsAlarmSettingsSnoozeWindow.cpp => products/BellHybrid/apps/application-bell-settings/windows/alarm_settings/BellSettingsAlarmSettingsSnoozeWindow.cpp +2 -2
@@ 62,9 62,9 @@ namespace gui
void BellSettingsAlarmSettingsSnoozeWindow::exit()
{
presenter->saveData();
- application->switchWindow(BellFinishedWindow::defaultName,
+ application->switchWindow(window::bell_finished::defaultName,
BellFinishedWindowData::Factory::create(
- "big_check_W_M",
+ "big_check_W_G",
utils::translate("app_bell_settings_alarm_settings_snooze_finished"),
BellSettingsAlarmSettingsMenuWindow::name));
}
M products/BellHybrid/apps/application-bell-settings/windows/alarm_settings/BellSettingsAlarmSettingsWindow.cpp => products/BellHybrid/apps/application-bell-settings/windows/alarm_settings/BellSettingsAlarmSettingsWindow.cpp +1 -1
@@ 63,7 63,7 @@ namespace gui
{
presenter->saveData();
application->switchWindow(
- BellFinishedWindow::defaultName,
+ window::bell_finished::defaultName,
BellFinishedWindowData::Factory::create(
"circle_success",
utils::translate("app_bell_settings_alarm_settings_alarm_tone_and_light_finished"),
M products/BellHybrid/apps/application-bell-settings/windows/alarm_settings/BellSettingsPrewakeUpWindow.cpp => products/BellHybrid/apps/application-bell-settings/windows/alarm_settings/BellSettingsPrewakeUpWindow.cpp +2 -2
@@ 61,9 61,9 @@ namespace gui
void BellSettingsPrewakeUpWindow::exit()
{
presenter->saveData();
- application->switchWindow(BellFinishedWindow::defaultName,
+ application->switchWindow(window::bell_finished::defaultName,
BellFinishedWindowData::Factory::create(
- "big_check_W_M",
+ "big_check_W_G",
utils::translate("app_bell_settings_alarm_settings_prewake_up_finished"),
BellSettingsAlarmSettingsMenuWindow::name));
}
M products/BellHybrid/apps/common/include/common/windows/BellFinishedWindow.hpp => products/BellHybrid/apps/common/include/common/windows/BellFinishedWindow.hpp +9 -3
@@ 9,14 9,20 @@
namespace gui
{
+ namespace window::bell_finished
+ {
+ constexpr inline auto defaultName = "BellFinishedWindow";
+ constexpr inline auto image_top_margin = 112U;
+ constexpr inline auto image_bottom_margin = 30U;
+ } // namespace window::bell_finished
+
class Icon;
class BellFinishedWindow : public WindowWithTimer
{
public:
- static constexpr auto defaultName = "BellFinishedWindow";
-
- explicit BellFinishedWindow(app::ApplicationCommon *app, const std::string &name = defaultName);
+ explicit BellFinishedWindow(app::ApplicationCommon *app,
+ const std::string &name = window::bell_finished::defaultName);
protected:
void buildInterface() override;
M products/BellHybrid/apps/common/src/options/BellOptionWindow.cpp => products/BellHybrid/apps/common/src/options/BellOptionWindow.cpp +0 -1
@@ 30,7 30,6 @@ namespace gui
bottomBar->setVisible(false);
optionsList = new gui::ListViewWithArrows(this, 0, 0, style::window_width, style::window_height, optionsModel);
- optionsList->setAlignment(Alignment(Alignment::Vertical::Top));
optionsList->applySizeRestrictions(style::bell_options_list::w,
style::bell_options_list::h,
style::bell_options_list::outer_layouts_h,
M => +0 -2
@@ 17,8 17,6 @@ namespace gui
{
addOptions(settingsOptionsList());
setListTitle(utils::translate("app_bell_turn_off_question"));
optionsList->setBoundaries(Boundaries::Continuous);
optionsList->setAlignment(Alignment(Alignment::Vertical::Center));
}
std::list<Option> BellTurnOffOptionWindow::settingsOptionsList()
M products/BellHybrid/apps/common/src/windows/BellFinishedWindow.cpp => products/BellHybrid/apps/common/src/windows/BellFinishedWindow.cpp +8 -3
@@ 28,8 28,13 @@ namespace gui
header->setTitleVisibility(false);
bottomBar->setVisible(false);
- icon = new Icon(this, 0, 0, style::window_width, style::window_height, {}, {});
- icon->text->setFont(style::window::font::verybiglight);
+ if (icon == nullptr) {
+ icon = new Icon(this, 0, 0, style::window_width, style::window_height, {}, {});
+ icon->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Top));
+ icon->image->setMargins(
+ {0, window::bell_finished::image_top_margin, 0, window::bell_finished::image_bottom_margin});
+ icon->text->setFont(style::window::font::verybiglight);
+ }
}
bool BellFinishedWindow::onInput(const InputEvent &inputEvent)
@@ 47,7 52,7 @@ namespace gui
if (auto metadata = dynamic_cast<BellFinishedWindowData *>(data)) {
icon->image->set(metadata->icon);
- icon->text->setText(metadata->text);
+ icon->text->setRichText(metadata->text);
windowToReturn = metadata->windowToReturn;
}
}
M products/BellHybrid/apps/common/src/windows/BellWelcomeWindow.cpp => products/BellHybrid/apps/common/src/windows/BellWelcomeWindow.cpp +1 -1
@@ 30,7 30,7 @@ namespace gui
muditaLogo->setMinimumSizeToFitImage();
auto welcomeText = new TextFixedSize(body->centerBox);
- welcomeText->setMinimumSize(style::bell_base_layout::w,
+ welcomeText->setMinimumSize(style::bell_base_layout::center_layout_w,
style::bell_base_layout::center_layout_h - midline_correction);
welcomeText->setFont(style::window::font::largelight);
welcomeText->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Center));