Skip to content

Commit

Permalink
separator for buttons area
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed Aug 17, 2024
1 parent c9e9431 commit da4b007
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/bedsidemon/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,31 @@ std::vector<utki::shared_ref<ruis::widget>> make_buttons(utki::shared_ref<ruis::
// clang-format off
return {
make_button("img_home"sv),
make_button("img_cog"sv),
m::rectangle(c,
{
.layout_params = {
.dims = {lp::fill, lp::fill},
.weight = 1
},
.color_params = {
.color = 0xff008080 // NOLINT
}
}
)
make_button("img_cog"sv)
};
// clang-format on
}
} // namespace

namespace {
utki::shared_ref<ruis::rectangle> make_separator(utki::shared_ref<ruis::context> c)
{
// clang-format off
return m::rectangle(
std::move(c),
{
.layout_params = {
.dims = {lp::fill, 1_pp}
},
.color_params = {
.color = style::color_border
}
}
);
// clang-format on
}
} // namespace

utki::shared_ref<ruis::widget> bedsidemon::make_root_widgets(utki::shared_ref<ruis::context> c)
{
constexpr auto alarms_area_height = 70_pp;
Expand All @@ -131,16 +139,7 @@ utki::shared_ref<ruis::widget> bedsidemon::make_root_widgets(utki::shared_ref<ru
}
}
),
m::rectangle(c,
{
.layout_params = {
.dims = {lp::fill, 1_pp}
},
.color_params = {
.color = style::color_border
}
}
),
make_separator(c),
m::container(c,
{
.layout_params = {
Expand All @@ -156,6 +155,7 @@ utki::shared_ref<ruis::widget> bedsidemon::make_root_widgets(utki::shared_ref<ru
},
{}
),
make_separator(c),
m::container(c,
{
.layout_params = {
Expand Down

0 comments on commit da4b007

Please sign in to comment.