Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed Aug 31, 2024
1 parent f7116d2 commit b1e5956
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 27 deletions.
29 changes: 14 additions & 15 deletions src/bedsidemon/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
using namespace std::string_literals;
using namespace std::string_view_literals;

using ruis::lp;
using namespace ruis::length_literals;

using namespace bedsidemon;
Expand All @@ -54,7 +53,7 @@ std::vector<utki::shared_ref<ruis::widget>> make_buttons(utki::shared_ref<ruis::
return m::push_button(c,
{
.layout_params = {
.dims = {lp::min, lp::fill}
.dims = {ruis::dim::min, ruis::dim::fill}
},
.widget_params = {
.id = std::move(id)
Expand All @@ -64,7 +63,7 @@ std::vector<utki::shared_ref<ruis::widget>> make_buttons(utki::shared_ref<ruis::
m::margins(c,
{
.layout_params = {
.dims = {lp::min, lp::fill}
.dims = {ruis::dim::min, ruis::dim::fill}
},
.container_params = {
.layout = ruis::layout::pile
Expand All @@ -77,7 +76,7 @@ std::vector<utki::shared_ref<ruis::widget>> make_buttons(utki::shared_ref<ruis::
m::image(c,
{
.layout_params = {
.dims = {lp::min, lp::fill}
.dims = {ruis::dim::min, ruis::dim::fill}
},
.image_params = {
.img = c.get().loader.load<ruis::res::image>(icon_res_id),
Expand Down Expand Up @@ -110,8 +109,8 @@ utki::shared_ref<ruis::rectangle> make_separator(utki::shared_ref<ruis::context>
{
.layout_params = {
.dims = {
vertical ? 1_pp : lp::fill,
vertical ? lp::fill : 1_pp
vertical ? ruis::dimension(1_pp) : ruis::dimension(ruis::dim::fill),
vertical ? ruis::dimension(ruis::dim::fill) : ruis::dimension(1_pp)
}
},
.color_params = {
Expand Down Expand Up @@ -151,14 +150,14 @@ utki::shared_ref<ruis::widget> bedsidemon::make_root_widgets(utki::shared_ref<ru
m::row(c,
{
.layout_params = {
.dims = {lp::fill, alarms_area_height}
.dims = {ruis::dim::fill, alarms_area_height}
}
},
{
m::row(c,
{
.layout_params = {
.dims = {lp::fill, lp::fill},
.dims = {ruis::dim::fill, ruis::dim::fill},
.weight = 1
},
.widget_params = {
Expand All @@ -177,8 +176,8 @@ utki::shared_ref<ruis::widget> bedsidemon::make_root_widgets(utki::shared_ref<ru
m::pile(c,
{
.layout_params = {
.dims = {clock_area_width, lp::min},
.align = {lp::align::center, lp::align::center}
.dims = {clock_area_width, ruis::dim::min},
.align = {ruis::align::center, ruis::align::center}

}
},
Expand Down Expand Up @@ -212,15 +211,15 @@ utki::shared_ref<ruis::widget> bedsidemon::make_root_widgets(utki::shared_ref<ru
m::pile(c,
{
.layout_params = {
.dims = {lp::fill, lp::fill},
.dims = {ruis::dim::fill, ruis::dim::fill},
.weight = 1
}
},
{
m::column(c,
{
.layout_params = {
.dims = {lp::fill, lp::fill}
.dims = {ruis::dim::fill, ruis::dim::fill}
},
.widget_params = {
.id = "pw_container"s
Expand All @@ -230,14 +229,14 @@ utki::shared_ref<ruis::widget> bedsidemon::make_root_widgets(utki::shared_ref<ru
m::row(c,
{
.layout_params = {
.dims = {lp::fill, lp::fill}
.dims = {ruis::dim::fill, ruis::dim::fill}
}
},
{
m::pile(c,
{
.layout_params = {
.dims = {lp::fill, lp::fill},
.dims = {ruis::dim::fill, ruis::dim::fill},
.weight = 3
},
.widget_params = {
Expand Down Expand Up @@ -275,7 +274,7 @@ utki::shared_ref<ruis::widget> bedsidemon::make_root_widgets(utki::shared_ref<ru
m::row(c,
{
.layout_params = {
.dims = {lp::fill, buttons_area_height}
.dims = {ruis::dim::fill, buttons_area_height}
},
.widget_params = {
.id = "button_area"s
Expand Down
2 changes: 1 addition & 1 deletion src/bedsidemon/settings_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ settings_menu::settings_menu(utki::shared_ref<ruis::context> context) :
ruis::widget(
std::move(context), //
{
.dims = {ruis::lp::fill, ruis::lp::fill}
.dims = {ruis::dim::fill, ruis::dim::fill}
},
{}
),
Expand Down
21 changes: 10 additions & 11 deletions src/bedsidemon/spo2/spo2_parameter_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ using namespace ruis::make;
using namespace bedsidemon::make;
}; // namespace m

using ruis::lp;
using namespace ruis::length_literals;

constexpr auto color_main_value = 0xffffff00;
Expand All @@ -66,7 +65,7 @@ std::vector<utki::shared_ref<ruis::widget>> make_numeric_content(utki::shared_re
m::text(c,
{
.layout_params = {
.align = {lp::align::front, lp::align::front}
.align = {ruis::align::front, ruis::align::front}
},
.color_params = {
.color = style::color_info_text
Expand Down Expand Up @@ -111,8 +110,8 @@ std::vector<utki::shared_ref<ruis::widget>> make_numeric_content(utki::shared_re
m::image(c,
{
.layout_params = {
.dims = {heart_size, lp::min},
.align = {lp::align::front, lp::align::front}
.dims = {heart_size, ruis::dim::min},
.align = {ruis::align::front, ruis::align::front}
},
.widget_params = {
.id = "heart"s,
Expand All @@ -137,7 +136,7 @@ std::vector<utki::shared_ref<ruis::widget>> make_widgets(utki::shared_ref<ruis::
m::waveform(c,
{
.layout_params = {
.dims = {lp::fill, lp::fill},
.dims = {ruis::dim::fill, ruis::dim::fill},
.weight = 3
},
.widget_params = {
Expand All @@ -152,15 +151,15 @@ std::vector<utki::shared_ref<ruis::widget>> make_widgets(utki::shared_ref<ruis::
m::row(c,
{
.layout_params = {
.dims = {lp::fill, lp::min},
.dims = {ruis::dim::fill, ruis::dim::min},
.weight = 1
}
},
{
m::rectangle(c,
{
.layout_params = {
.dims = {1_pp, lp::fill}
.dims = {1_pp, ruis::dim::fill}
},
.color_params = {
.color = style::color_border
Expand All @@ -170,15 +169,15 @@ std::vector<utki::shared_ref<ruis::widget>> make_widgets(utki::shared_ref<ruis::
m::column(c,
{
.layout_params = {
.dims = {lp::fill, lp::min},
.dims = {ruis::dim::fill, ruis::dim::min},
.weight = 1
}
},
{
m::margins(c,
{
.layout_params = {
.dims = {lp::fill, lp::min}
.dims = {ruis::dim::fill, ruis::dim::min}
},
.container_params = {
.layout = ruis::layout::column
Expand All @@ -192,7 +191,7 @@ std::vector<utki::shared_ref<ruis::widget>> make_widgets(utki::shared_ref<ruis::
m::rectangle(c,
{
.layout_params = {
.dims = {lp::fill, 1_pp}
.dims = {ruis::dim::fill, 1_pp}
},
.color_params = {
.color = style::color_border
Expand All @@ -212,7 +211,7 @@ spo2_parameter_window::spo2_parameter_window(utki::shared_ref<ruis::context> con
ruis::widget( //
std::move(context),
{//
.dims = {ruis::lp::fill, ruis::lp::min}
.dims = {ruis::dim::fill, ruis::dim::min}
},
{}
),
Expand Down

0 comments on commit b1e5956

Please sign in to comment.