#include "OptionWindow.hpp" #include "Label.hpp" #include "Margins.hpp" #include "i18/i18.hpp" #include "service-appmgr/ApplicationManager.hpp" #include #include #include namespace gui { OptionWindow::OptionWindow(app::Application *app, const std::string &name) : AppWindow(app, name) { setSize(style::window_width, style::window_height); buildInterface(); } void OptionWindow::rebuild() { } Item *newOptionLabel(const UTF8 &text, std::function activatedCallback) { // TODO fix elements positioning with styles ready, right now moved from Settings main window as it is gui::Label *label = new gui::Label(nullptr, 20, 0, style::window_width - 2 * 20, style::window::label::big_h, text); style::window::decorateOption(label); label->activatedCallback = activatedCallback; new gui::Image(label, 425 - 17, 24, 0, 0, "right_label_arrow"); return label; } Item *newOptionLabel(const Option &option) { return newOptionLabel(option.text, option.activatedCallback); } void OptionWindow::addOptionLabel(const UTF8 &text, std::function activatedCallback) { body->addWidget(newOptionLabel(text, activatedCallback)); } void OptionWindow::addOptions(std::list