Files
MuditaOS/module-apps/application-call/widgets/Icon.cpp
Alek-Mudita 1c6701ff2a Egd 516 enter number window (#89)
* EGD-516 fixed layout in enterwindow.
Gently refactor the code.
Minor enhancments.

* EGD-516 removed reinterpret casts from enterwindow

* EGD-516 added new contact icon

* EGD-516 added missing font and new Icon widget.

* EGD-516 fixed icon label alignment

* EGD-516 minor icon changes

* EGD-516 add CallAppStyle

* EGD-516 added icon styl to callappstyle
2019-11-27 14:15:40 +01:00

23 lines
975 B
C++

#include "Icon.hpp"
#include "../data/CallAppStyle.hpp"
#include <log/log.hpp>
using namespace callAppStyle;
namespace gui
{
Icon::Icon(Item *parent, const uint32_t &x, const uint32_t &y, const std::string &imageName, const std::string &labelStr)
: Rect(parent, x, y, icon::w, icon::h)
{
setEdges( RectangleEdgeFlags::GUI_RECT_EDGE_BOTTOM | RectangleEdgeFlags::GUI_RECT_EDGE_TOP );
setPenFocusWidth(style::window::default_border_focucs_w);
setPenWidth(style::window::default_border_no_focus_w);
img = new gui::Image(this, icon::img::x, icon::img::y, icon::img::w, icon::img::h, imageName);
label = new gui::Label(this, icon::label::x, icon::label::y, icon::label::w, icon::label::h, labelStr);
label->setEdges(RectangleEdgeFlags::GUI_RECT_EDGE_NO_EDGES);
label->setAlignement(gui::Alignment(gui::Alignment::ALIGN_HORIZONTAL_CENTER, gui::Alignment::ALIGN_VERTICAL_CENTER));
label->setFont(style::window::font::verysmall);
}
} // namespace gui