M module-apps/application-alarm-clock/widgets/AlarmClockStyle.hpp => module-apps/application-alarm-clock/widgets/AlarmClockStyle.hpp +0 -4
@@ 12,10 12,6 @@ namespace style::alarmClock
namespace window
{
- inline constexpr auto cross_x = 48;
- inline constexpr auto cross_y = 55;
- inline constexpr auto arrow_x = 30;
- inline constexpr auto arrow_y = 62;
inline constexpr auto listView_x = style::window::default_left_margin;
inline constexpr auto listView_y = style::window::default_vertical_pos;
inline constexpr auto listView_w = style::listview::body_width_with_scroll;
M module-apps/application-alarm-clock/windows/AlarmClockMainWindow.cpp => module-apps/application-alarm-clock/windows/AlarmClockMainWindow.cpp +4 -8
@@ 7,6 7,7 @@
#include "windows/DialogMetadata.hpp"
#include "messages/DialogMetadataMessage.hpp"
#include <InputEvent.hpp>
+#include <header/AddElementAction.hpp>
#include <service-appmgr/Controller.hpp>
#include <module-services/service-db/service-db/DBNotificationMessage.hpp>
@@ 36,10 37,7 @@ namespace app::alarmClock
bottomBar->setText(gui::BottomBar::Side::LEFT, utils::translate(style::strings::common::options));
setTitle(utils::translate("app_alarm_clock_title_main"));
- leftArrowImage = new gui::Image(
- this, style::alarmClock::window::arrow_x, style::alarmClock::window::arrow_y, 0, 0, "arrow_left");
- plusSignImage =
- new gui::Image(this, style::alarmClock::window::cross_x, style::alarmClock::window::cross_y, 0, 0, "cross");
+ header->navigationIndicatorAdd(new gui::header::AddElementAction(), gui::header::BoxSelection::Left);
alarmsList = new gui::ListView(this,
style::alarmClock::window::listView_x,
@@ 74,10 72,8 @@ namespace app::alarmClock
void AlarmClockMainWindow::destroyInterface()
{
erase();
- alarmsList = nullptr;
- leftArrowImage = nullptr;
- plusSignImage = nullptr;
- emptyListIcon = nullptr;
+ alarmsList = nullptr;
+ emptyListIcon = nullptr;
}
void AlarmClockMainWindow::onBeforeShow(gui::ShowMode mode, gui::SwitchData *data)
M module-apps/application-alarm-clock/windows/AlarmClockMainWindow.hpp => module-apps/application-alarm-clock/windows/AlarmClockMainWindow.hpp +1 -3
@@ 1,4 1,4 @@
-// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
@@ 14,8 14,6 @@ namespace app::alarmClock
{
class AlarmClockMainWindow : public gui::AppWindow, public AlarmClockMainWindowContract::View
{
- gui::Image *leftArrowImage = nullptr;
- gui::Image *plusSignImage = nullptr;
gui::Icon *emptyListIcon = nullptr;
gui::ListView *alarmsList = nullptr;
std::unique_ptr<AlarmClockMainWindowContract::Presenter> presenter;
M module-apps/application-calendar/widgets/CalendarStyle.hpp => module-apps/application-calendar/widgets/CalendarStyle.hpp +0 -4
@@ 46,10 46,6 @@ namespace style
inline constexpr auto max_weeks_number = 6;
inline constexpr auto leftMargin = 10;
- inline constexpr auto cross_x = 48;
- inline constexpr auto cross_y = 55;
- inline constexpr auto arrow_x = 30;
- inline constexpr auto arrow_y = 62;
inline constexpr auto listView_x = style::window::default_left_margin;
inline constexpr auto listView_y = style::window::default_vertical_pos;
inline constexpr auto listView_w = style::listview::body_width_with_scroll;
M module-apps/application-calendar/windows/AllEventsWindow.cpp => module-apps/application-calendar/windows/AllEventsWindow.cpp +2 -4
@@ 6,6 6,7 @@
#include "application-calendar/ApplicationCalendar.hpp"
#include "application-calendar/data/CalendarData.hpp"
#include <gui/widgets/Window.hpp>
+#include <header/AddElementAction.hpp>
#include <service-appmgr/Controller.hpp>
#include <module-db/queries/calendar/QueryEventsGetAllLimited.hpp>
@@ 38,10 39,7 @@ namespace gui
bottomBar->setText(gui::BottomBar::Side::LEFT, utils::translate("app_calendar_bar_month"));
setTitle(utils::translate("app_calendar_title_main"));
- leftArrowImage = new gui::Image(
- this, style::window::calendar::arrow_x, style::window::calendar::arrow_y, 0, 0, "arrow_left");
- newDayEventImage =
- new gui::Image(this, style::window::calendar::cross_x, style::window::calendar::cross_y, 0, 0, "cross");
+ header->navigationIndicatorAdd(new gui::header::AddElementAction(), gui::header::BoxSelection::Left);
allEventsList = new gui::CalendarListView(this,
style::window::calendar::listView_x,
M module-apps/application-calendar/windows/AllEventsWindow.hpp => module-apps/application-calendar/windows/AllEventsWindow.hpp +1 -4
@@ 1,4 1,4 @@
-// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
@@ 13,9 13,6 @@ namespace gui
{
class AllEventsWindow : public gui::AppWindow
{
- gui::Image *leftArrowImage = nullptr;
- gui::Image *newDayEventImage = nullptr;
-
TimePoint dateFilter = TimePointNow();
gui::ListView *allEventsList = nullptr;
std::shared_ptr<AllEventsModel> allEventsModel = nullptr;
M module-apps/application-calendar/windows/DayEventsWindow.cpp => module-apps/application-calendar/windows/DayEventsWindow.cpp +2 -4
@@ 8,6 8,7 @@
#include <gui/widgets/Label.hpp>
#include <gui/widgets/Item.hpp>
#include <gui/widgets/Image.hpp>
+#include <header/AddElementAction.hpp>
#include <time/time_conversion.hpp>
#include <module-db/queries/calendar/QueryEventsGetFiltered.hpp>
@@ 68,10 69,7 @@ namespace gui
bottomBar->setText(gui::BottomBar::Side::CENTER, utils::translate(style::strings::common::open));
setTitle(dayMonthTitle);
- leftArrowImage = new gui::Image(
- this, style::window::calendar::arrow_x, style::window::calendar::arrow_y, 0, 0, "arrow_left");
- newDayEventImage =
- new gui::Image(this, style::window::calendar::cross_x, style::window::calendar::cross_y, 0, 0, "cross");
+ header->navigationIndicatorAdd(new gui::header::AddElementAction(), gui::header::BoxSelection::Left);
dayEventsList = new gui::ListView(this,
style::window::calendar::listView_x,
M module-apps/application-calendar/windows/DayEventsWindow.hpp => module-apps/application-calendar/windows/DayEventsWindow.hpp +1 -3
@@ 1,4 1,4 @@
-// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
@@ 22,8 22,6 @@ namespace gui
{
std::string dayMonthTitle;
TimePoint filterFrom;
- gui::Image *leftArrowImage = nullptr;
- gui::Image *newDayEventImage = nullptr;
gui::ListView *dayEventsList = nullptr;
std::shared_ptr<DayEventsModel> dayEventsModel = nullptr;
M module-apps/application-messages/windows/MessagesMainWindow.cpp => module-apps/application-messages/windows/MessagesMainWindow.cpp +5 -7
@@ 18,6 18,9 @@
#include <Style.hpp>
#include <log.hpp>
+#include <header/AddElementAction.hpp>
+#include <header/SearchAction.hpp>
+
#include <module-db/queries/notifications/QueryNotificationsClear.hpp>
#include <module-db/queries/messages/threads/QueryThreadGetByContactID.hpp>
@@ 66,11 69,8 @@ namespace gui
bottomBar->setText(BottomBar::Side::RIGHT, utils::translate(style::strings::common::back));
setTitle(utils::translate("app_messages_title_main"));
-
- leftArrowImage = new gui::Image(this, 30, 62, 0, 0, "arrow_left");
- rightArrowImage = new gui::Image(this, 480 - 30 - 13, 62, 0, 0, "arrow_right");
- newMessageImage = new gui::Image(this, 48, 55, 0, 0, "cross");
- searchImage = new gui::Image(this, 480 - 48 - 26, 55, 0, 0, "search");
+ header->navigationIndicatorAdd(new gui::header::AddElementAction(), gui::header::BoxSelection::Left);
+ header->navigationIndicatorAdd(new gui::header::SearchAction(), gui::header::BoxSelection::Right);
emptyListIcon = new Icon(this,
0,
@@ 84,8 84,6 @@ namespace gui
list->focusChangedCallback = [this]([[maybe_unused]] gui::Item &item) {
bottomBar->setActive(BottomBar::Side::LEFT, true);
bottomBar->setActive(BottomBar::Side::CENTER, true);
- rightArrowImage->setVisible(true);
- searchImage->setVisible(true);
return true;
};
M module-apps/application-messages/windows/MessagesMainWindow.hpp => module-apps/application-messages/windows/MessagesMainWindow.hpp +1 -5
@@ 1,4 1,4 @@
-// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
@@ 20,10 20,6 @@ namespace gui
class MessagesMainWindow : public AppWindow, public app::AsyncCallbackReceiver
{
protected:
- Image *leftArrowImage = nullptr;
- Image *rightArrowImage = nullptr;
- Image *newMessageImage = nullptr;
- Image *searchImage = nullptr;
Icon *emptyListIcon = nullptr;
std::shared_ptr<ThreadsModel> threadsModel = nullptr;
gui::ListView *list = nullptr;
D module-apps/application-notes/style/NotesMainWindowStyle.hpp => module-apps/application-notes/style/NotesMainWindowStyle.hpp +0 -37
@@ 1,37 0,0 @@
-// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#pragma once
-
-#include <module-gui/gui/widgets/Style.hpp>
-
-namespace app::notes::style::main_window
-{
- namespace new_note_arrow
- {
- constexpr inline auto X = 30;
- constexpr inline auto Y = 62;
- constexpr inline auto ImageSource = "arrow_left";
- } // namespace new_note_arrow
-
- namespace new_note_image
- {
- constexpr inline auto X = 48;
- constexpr inline auto Y = 55;
- constexpr inline auto ImageSource = "cross";
- } // namespace new_note_image
-
- namespace search_arrow
- {
- constexpr inline auto X = 480 - 30 - 13;
- constexpr inline auto Y = 62;
- constexpr inline auto ImageSource = "arrow_right";
- } // namespace search_arrow
-
- namespace search_image
- {
- constexpr inline auto X = 480 - 48 - 26;
- constexpr inline auto Y = 55;
- constexpr inline auto ImageSource = "search";
- } // namespace search_image
-} // namespace app::notes::style::main_window
M module-apps/application-notes/windows/NoteMainWindow.cpp => module-apps/application-notes/windows/NoteMainWindow.cpp +8 -35
@@ 11,8 11,9 @@
#include <i18n/i18n.hpp>
#include <Style.hpp>
+#include <header/AddElementAction.hpp>
+#include <header/SearchAction.hpp>
#include <module-apps/application-notes/style/NotesListStyle.hpp>
-#include <module-apps/application-notes/style/NotesMainWindowStyle.hpp>
#include <module-services/service-db/service-db/DBNotificationMessage.hpp>
@@ 42,6 43,8 @@ namespace app::notes
AppWindow::buildInterface();
setTitle(utils::translate("app_notes_title_main"));
+ header->navigationIndicatorAdd(new gui::header::AddElementAction(), gui::header::BoxSelection::Left);
+ header->navigationIndicatorAdd(new gui::header::SearchAction(), gui::header::BoxSelection::Right);
bottomBar->setActive(gui::BottomBar::Side::LEFT, true);
bottomBar->setText(gui::BottomBar::Side::LEFT, utils::translate(::style::strings::common::options));
@@ 50,32 53,6 @@ namespace app::notes
bottomBar->setActive(gui::BottomBar::Side::RIGHT, true);
bottomBar->setText(gui::BottomBar::Side::RIGHT, utils::translate(::style::strings::common::back));
- namespace windowStyle = app::notes::style::main_window;
- leftArrowImage = new gui::Image(this,
- windowStyle::new_note_arrow::X,
- windowStyle::new_note_arrow::Y,
- 0,
- 0,
- windowStyle::new_note_arrow::ImageSource);
- rightArrowImage = new gui::Image(this,
- windowStyle::search_arrow::X,
- windowStyle::search_arrow::Y,
- 0,
- 0,
- windowStyle::search_arrow::ImageSource);
- newNoteImage = new gui::Image(this,
- windowStyle::new_note_image::X,
- windowStyle::new_note_image::Y,
- 0,
- 0,
- windowStyle::new_note_image::ImageSource);
- searchImage = new gui::Image(this,
- windowStyle::search_image::X,
- windowStyle::search_image::Y,
- 0,
- 0,
- windowStyle::search_image::ImageSource);
-
namespace listStyle = app::notes::style::list;
list = new gui::ListView(this,
listStyle::X,
@@ 116,10 93,6 @@ namespace app::notes
{
erase();
list = nullptr;
- leftArrowImage = nullptr;
- rightArrowImage = nullptr;
- newNoteImage = nullptr;
- searchImage = nullptr;
emptyListIcon = nullptr;
}
@@ 128,8 101,8 @@ namespace app::notes
bottomBar->setActive(gui::BottomBar::Side::LEFT, false);
bottomBar->setActive(gui::BottomBar::Side::CENTER, false);
emptyListIcon->setVisible(true);
- rightArrowImage->setVisible(false);
- searchImage->setVisible(false);
+ header->navigationIndicatorRemove(gui::header::BoxSelection::Left);
+ header->navigationIndicatorRemove(gui::header::BoxSelection::Right);
}
void NoteMainWindow::onListFilled()
@@ 137,8 110,8 @@ namespace app::notes
bottomBar->setActive(gui::BottomBar::Side::LEFT, true);
bottomBar->setActive(gui::BottomBar::Side::CENTER, true);
emptyListIcon->setVisible(false);
- rightArrowImage->setVisible(true);
- searchImage->setVisible(true);
+ header->navigationIndicatorAdd(new gui::header::AddElementAction(), gui::header::BoxSelection::Left);
+ header->navigationIndicatorAdd(new gui::header::SearchAction(), gui::header::BoxSelection::Right);
}
bool NoteMainWindow::onInput(const gui::InputEvent &inputEvent)
M module-apps/application-notes/windows/NoteMainWindow.hpp => module-apps/application-notes/windows/NoteMainWindow.hpp +1 -5
@@ 1,4 1,4 @@
-// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
@@ 34,10 34,6 @@ namespace app::notes
std::unique_ptr<NotesMainWindowContract::Presenter> presenter;
gui::ListView *list = nullptr;
- gui::Image *leftArrowImage = nullptr;
- gui::Image *rightArrowImage = nullptr;
- gui::Image *newNoteImage = nullptr;
- gui::Image *searchImage = nullptr;
gui::Icon *emptyListIcon = nullptr;
};
} // namespace app::notes
M module-apps/application-phonebook/data/PhonebookStyle.hpp => module-apps/application-phonebook/data/PhonebookStyle.hpp +1 -29
@@ 12,35 12,7 @@ namespace phonebookStyle
inline constexpr uint32_t default_x = style::window::default_left_margin;
inline constexpr uint32_t default_w =
style::window_width - style::window::default_left_margin - style::window::default_right_margin;
- namespace leftArrowImage
- {
- inline constexpr uint32_t x = default_x;
- inline constexpr uint32_t y = 62;
- inline constexpr uint32_t w = 11;
- inline constexpr uint32_t h = 13;
- } // namespace leftArrowImage
- namespace rightArrowImage
- {
- inline constexpr uint32_t x = style::window_width - style::window::default_left_margin - 11;
- inline constexpr uint32_t y = 62;
- inline constexpr uint32_t w = 11;
- inline constexpr uint32_t h = 13;
- } // namespace rightArrowImage
- namespace newContactImage
- {
- inline constexpr uint32_t x = style::window::default_left_margin + 20;
- inline constexpr uint32_t y = 55;
- inline constexpr uint32_t w = 24;
- inline constexpr uint32_t h = 24;
- } // namespace newContactImage
- namespace searchImage
- {
- inline constexpr uint32_t x =
- style::window_width - style::window::default_left_margin - rightArrowImage::w - 8 - 26;
- inline constexpr uint32_t y = 55;
- inline constexpr uint32_t w = 26;
- inline constexpr uint32_t h = 26;
- } // namespace searchImage
+
namespace contactsList
{
inline constexpr uint32_t x = style::window::default_left_margin;
M module-apps/application-phonebook/windows/PhonebookIceContacts.hpp => module-apps/application-phonebook/windows/PhonebookIceContacts.hpp +1 -2
@@ 1,4 1,4 @@
-// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
@@ 29,7 29,6 @@ namespace gui
private:
std::shared_ptr<PhonebookModel> phonebookModel;
ListView *contactsListIce = nullptr;
- Image *leftArrowImage = nullptr;
};
} /* namespace gui */
M module-apps/application-phonebook/windows/PhonebookMainWindow.cpp => module-apps/application-phonebook/windows/PhonebookMainWindow.cpp +6 -26
@@ 8,6 8,8 @@
#include <queries/phonebook/QueryContactGet.hpp>
+#include <header/AddElementAction.hpp>
+#include <header/SearchAction.hpp>
#include <service-appmgr/Controller.hpp>
#include <service-db/QueryMessage.hpp>
#include <service-db/DBNotificationMessage.hpp>
@@ 31,30 33,8 @@ namespace gui
AppWindow::buildInterface();
setTitle(utils::translate("app_phonebook_title_main"));
- leftArrowImage = new gui::Image(this,
- phonebookStyle::mainWindow::leftArrowImage::x,
- phonebookStyle::mainWindow::leftArrowImage::y,
- phonebookStyle::mainWindow::leftArrowImage::w,
- phonebookStyle::mainWindow::leftArrowImage::h,
- "arrow_left");
- rightArrowImage = new gui::Image(this,
- phonebookStyle::mainWindow::rightArrowImage::x,
- phonebookStyle::mainWindow::rightArrowImage::y,
- phonebookStyle::mainWindow::rightArrowImage::w,
- phonebookStyle::mainWindow::rightArrowImage::h,
- "arrow_right");
- newContactImage = new gui::Image(this,
- phonebookStyle::mainWindow::newContactImage::x,
- phonebookStyle::mainWindow::newContactImage::y,
- phonebookStyle::mainWindow::newContactImage::w,
- phonebookStyle::mainWindow::newContactImage::h,
- "cross");
- searchImage = new gui::Image(this,
- phonebookStyle::mainWindow::searchImage::x,
- phonebookStyle::mainWindow::searchImage::y,
- phonebookStyle::mainWindow::searchImage::w,
- phonebookStyle::mainWindow::searchImage::h,
- "search");
+ header->navigationIndicatorAdd(new gui::header::AddElementAction(), gui::header::BoxSelection::Left);
+ header->navigationIndicatorAdd(new gui::header::SearchAction(), gui::header::BoxSelection::Right);
contactsList = new gui::PhonebookListView(this,
phonebookStyle::mainWindow::contactsList::x,
@@ 110,8 90,8 @@ namespace gui
std::make_unique<app::manager::SwitchBackRequest>(application->GetName(), std::move(data)));
};
- leftArrowImage->setVisible(false);
- newContactImage->setVisible(false);
+ header->navigationIndicatorRemove(gui::header::BoxSelection::Left);
+ header->navigationIndicatorRemove(gui::header::BoxSelection::Right);
}
}
M module-apps/application-phonebook/windows/PhonebookMainWindow.hpp => module-apps/application-phonebook/windows/PhonebookMainWindow.hpp +1 -5
@@ 1,4 1,4 @@
-// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
@@ 21,10 21,6 @@ namespace gui
std::shared_ptr<PhonebookModel> phonebookModel = nullptr;
ListView *contactsList = nullptr;
- Image *leftArrowImage = nullptr;
- Image *rightArrowImage = nullptr;
- Image *newContactImage = nullptr;
- Image *searchImage = nullptr;
bool enableNewContact = true;
bool requestedSearch = false;
std::unique_ptr<InputMode> inputMode;
M module-apps/application-settings-new/widgets/SettingsStyle.hpp => module-apps/application-settings-new/widgets/SettingsStyle.hpp +0 -15
@@ 42,21 42,6 @@ namespace style
namespace window
{
- namespace leftArrowImage
- {
- inline constexpr auto x = style::window::default_left_margin;
- inline constexpr auto y = 62;
- inline constexpr auto w = 11;
- inline constexpr auto h = 13;
- } // namespace leftArrowImage
-
- namespace crossImage
- {
- inline constexpr auto x = style::window::default_left_margin + 20;
- inline constexpr auto y = 55;
- inline constexpr auto w = 24;
- inline constexpr auto h = 24;
- } // namespace crossImage
namespace languageChange
{
inline constexpr auto options_posX = 17;
M module-apps/application-settings-new/windows/AllDevicesWindow.cpp => module-apps/application-settings-new/windows/AllDevicesWindow.cpp +2 -12
@@ 12,6 12,7 @@
#include <InputEvent.hpp>
#include <Image.hpp>
+#include <header/AddElementAction.hpp>
namespace gui
{
@@ 26,18 27,7 @@ namespace gui
void AllDevicesWindow::buildInterface()
{
setTitle(utils::translate("app_settings_bluetooth_all_devices"));
- leftArrowImage = new gui::Image(this,
- style::settings::window::leftArrowImage::x,
- style::settings::window::leftArrowImage::y,
- style::settings::window::leftArrowImage::w,
- style::settings::window::leftArrowImage::h,
- "arrow_left");
- crossImage = new gui::Image(this,
- style::settings::window::crossImage::x,
- style::settings::window::crossImage::y,
- style::settings::window::crossImage::w,
- style::settings::window::crossImage::h,
- "cross");
+ header->navigationIndicatorAdd(new gui::header::AddElementAction(), gui::header::BoxSelection::Left);
}
void AllDevicesWindow::onBeforeShow(ShowMode mode, SwitchData *data)
M module-apps/application-settings-new/windows/AllDevicesWindow.hpp => module-apps/application-settings-new/windows/AllDevicesWindow.hpp +0 -2
@@ 45,8 45,6 @@ namespace gui
auto handleDeviceAction(const ActiveDevice &) -> bool;
ActiveDevice activeDevice;
- Image *leftArrowImage = nullptr;
- Image *crossImage = nullptr;
std::vector<Devicei> devices{};
std::string addressOfDeviceSelected;
std::unique_ptr<BluetoothSettingsModel> bluetoothSettingsModel{};
M module-apps/application-settings-new/windows/ApnSettingsWindow.cpp => module-apps/application-settings-new/windows/ApnSettingsWindow.cpp +3 -13
@@ 8,6 8,7 @@
#include "application-settings-new/data/SettingsItemData.hpp"
#include "OptionSetting.hpp"
+#include <header/AddElementAction.hpp>
#include <InputEvent.hpp>
namespace gui
@@ 21,20 22,9 @@ namespace gui
void ApnSettingsWindow::buildInterface()
{
setTitle(utils::translate("app_settings_network_apn_settings"));
+ header->navigationIndicatorAdd(new gui::header::AddElementAction(), gui::header::BoxSelection::Left);
- leftArrowImage = new gui::Image(this,
- style::settings::window::leftArrowImage::x,
- style::settings::window::leftArrowImage::y,
- style::settings::window::leftArrowImage::w,
- style::settings::window::leftArrowImage::h,
- "arrow_left");
- crossImage = new gui::Image(this,
- style::settings::window::crossImage::x,
- style::settings::window::crossImage::y,
- style::settings::window::crossImage::w,
- style::settings::window::crossImage::h,
- "cross");
- emptyListIcon = new Icon(this,
+ emptyListIcon = new Icon(this,
0,
style::window::default_vertical_pos,
style::window_width,
M module-apps/application-settings-new/windows/ApnSettingsWindow.hpp => module-apps/application-settings-new/windows/ApnSettingsWindow.hpp +0 -2
@@ 23,8 23,6 @@ namespace gui
auto onInput(const InputEvent &inputEvent) -> bool override;
auto optionsList(std::vector<std::shared_ptr<packet_data::APN::Config>> vector) -> std::list<Option>;
- Image *leftArrowImage = nullptr;
- Image *crossImage = nullptr;
Icon *emptyListIcon = nullptr;
std::vector<std::shared_ptr<packet_data::APN::Config>> apns;
std::shared_ptr<packet_data::APN::Config> activeApn;
M module-apps/application-settings-new/windows/QuotesMainWindow.cpp => module-apps/application-settings-new/windows/QuotesMainWindow.cpp +2 -3
@@ 7,6 7,7 @@
#include "application-settings-new/widgets/SettingsStyle.hpp"
#include "OptionSetting.hpp"
+#include <header/AddElementAction.hpp>
#include <InputEvent.hpp>
#include <i18n/i18n.hpp>
#include <json11.hpp>
@@ 42,14 43,12 @@ namespace gui
AppWindow::buildInterface();
setTitle(utils::translate("app_settings_display_wallpaper_quotes"));
+ header->navigationIndicatorAdd(new gui::header::AddElementAction(), gui::header::BoxSelection::Left);
bottomBar->setText(BottomBar::Side::CENTER, utils::translate(style::strings::common::check));
bottomBar->setText(BottomBar::Side::RIGHT, utils::translate(style::strings::common::back));
bottomBar->setText(BottomBar::Side::LEFT, utils::translate(style::strings::common::options));
- new gui::Image(this, style::quotes::arrow_x, style::quotes::arrow_y, 0, 0, "arrow_left");
- new gui::Image(this, style::quotes::cross_x, style::quotes::cross_y, 0, 0, "cross");
-
list = new gui::ListView(this,
style::quotes::list::X,
style::quotes::list::Y,
M module-apps/apps-common/windows/NoEvents.cpp => module-apps/apps-common/windows/NoEvents.cpp +2 -29
@@ 7,41 7,14 @@
#include <log.hpp>
#include <service-appmgr/Controller.hpp>
+#include <header/AddElementAction.hpp>
#include <Image.hpp>
using namespace gui;
-namespace style
-{
- namespace arrow
- {
- const inline uint32_t x = 30;
- const inline uint32_t y = 62;
- } // namespace arrow
-
- namespace cross
- {
- const inline uint32_t x = 48;
- const inline uint32_t y = 55;
- } // namespace cross
-
- namespace icon
- {
- constexpr inline auto x = 176;
- constexpr inline auto y = 195;
- } // namespace icon
-
- namespace text
- {
- constexpr inline auto x = 40;
- constexpr inline auto y = 333;
- } // namespace text
-} // namespace style
-
NoEvents::NoEvents(app::Application *app, const std::string &name) : gui::Dialog(app, name)
{
- arrow = new gui::Image(this, style::arrow::x, style::arrow::y, 0, 0, "arrow_left");
- cross = new gui::Image(this, style::cross::x, style::cross::y, 0, 0, "cross");
+ header->navigationIndicatorAdd(new gui::header::AddElementAction(), gui::header::BoxSelection::Left);
}
void NoEvents::onBeforeShow(ShowMode mode, SwitchData *data)
M module-apps/apps-common/windows/NoEvents.hpp => module-apps/apps-common/windows/NoEvents.hpp +1 -4
@@ 1,4 1,4 @@
-// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
@@ 20,9 20,6 @@ namespace gui
class NoEvents : public Dialog
{
- gui::Image *arrow = nullptr;
- gui::Image *cross = nullptr;
-
public:
NoEvents(app::Application *app, const std::string &name);
void onBeforeShow(ShowMode mode, SwitchData *data) override;