mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-23 00:19:31 -04:00
42 lines
1.1 KiB
C++
42 lines
1.1 KiB
C++
#include "Style.hpp"
|
|
#include <Label.hpp>
|
|
|
|
namespace style::window
|
|
{
|
|
|
|
void decorate(gui::Rect *el)
|
|
{
|
|
if (el == nullptr) {
|
|
return;
|
|
}
|
|
el->setPenWidth(default_border_no_focus_w);
|
|
el->setPenFocusWidth(default_border_focus_w);
|
|
el->setEdges(gui::RectangleEdgeFlags::GUI_RECT_EDGE_TOP | gui::RectangleEdgeFlags::GUI_RECT_EDGE_BOTTOM);
|
|
el->setFilled(false);
|
|
}
|
|
|
|
void decorate(gui::Label *el)
|
|
{
|
|
if (el == nullptr) {
|
|
return;
|
|
}
|
|
decorate(static_cast<gui::Rect *>(el));
|
|
el->setAlignment(gui::Alignment(gui::Alignment::Horizontal::Left, gui::Alignment::Vertical::Center));
|
|
}
|
|
|
|
void decorateOption(gui::Label *el)
|
|
{
|
|
if (el == nullptr) {
|
|
return;
|
|
}
|
|
decorate(el);
|
|
el->setMargins(gui::Margins(10, 0, 20, 0));
|
|
el->setFont(style::window::font::big);
|
|
/// actual design values in px
|
|
el->widgetArea.w = style::window_width - 3 * 20;
|
|
el->widgetArea.x = 20;
|
|
el->widgetArea.h = style::window::label::big_h;
|
|
}
|
|
|
|
}; // namespace style::window
|