~aleteoryx/muditaos

ref: 017e3d88dc687c85f3d0aeab3cddf255c5cc5d99 muditaos/module-apps/widgets/IceBox.cpp -rw-r--r-- 1.2 KiB
017e3d88 — Przemyslaw Brudny [EGD-5711] Finalized onBoarding application 4 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
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "IceBox.hpp"

#include <Text.hpp>
#include <i18n/i18n.hpp>

namespace gui
{
    IceBox::IceBox(Item *parent)
        : HBox(parent, style::window::ice::x, style::window::ice::y, style::window::ice::w, style::window::ice::h)
    {
        setAlignment(Alignment(Alignment::Horizontal::Left, Alignment::Vertical::Center));
        setEdges(RectangleEdge::None);

        auto arrow        = new gui::Image("left_label_arrow");
        arrow->activeItem = false;
        arrow->setAlignment(Alignment(Alignment::Horizontal::Left, Alignment::Vertical::Center));
        arrow->setMargins(Margins(0, 0, style::window::ice::margin, 0));
        addWidget(arrow);

        auto iceText        = new gui::Text(nullptr, 0, 0, style::window::ice::text::w, style::window::ice::h);
        iceText->activeItem = false;
        iceText->setAlignment(Alignment(Alignment::Horizontal::Left, Alignment::Vertical::Center));
        iceText->setFont(style::window::font::verysmall);
        iceText->setText(utils::translate("app_desktop_emergency"));
        addWidget(iceText);
    }
} // namespace gui