~aleteoryx/muditaos

ref: 4bc7df5f4ae774dc87178eec2bd856600b617f0a muditaos/module-apps/application-settings-new/windows/QuotesAddWindow.cpp -rw-r--r-- 1.1 KiB
4bc7df5f — Tomek Sobkowiak [EDG-4049] Add locked screen settings window with ON/OFF (#900) 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "QuotesAddWindow.hpp"

#include "application-settings-new/ApplicationSettings.hpp"

#include <i18/i18.hpp>
#include <widgets/Text.hpp>

namespace gui
{
    QuotesAddWindow::QuotesAddWindow(app::Application *app) : AppWindow(app, gui::window::name::quotes)
    {
        setTitle(utils::localize.get("app_settings_display_locked_screen_new_quote"));
    }

    void QuotesAddWindow::buildInterface()
    {
        bottomBar->setText(BottomBar::Side::CENTER, utils::localize.get(style::strings::common::save));
        bottomBar->setText(BottomBar::Side::RIGHT, utils::localize.get(style::strings::common::back));

        auto text = new gui::Text(nullptr,
                                  style::window::default_left_margin,
                                  title->offset_h() + style::margins::big,
                                  style::window::default_body_width,
                                  style::window::default_body_height);

        addWidget(text);
        setFocusItem(text);
    }

} // namespace gui