Skip to content

Commit

Permalink
Clang-formatting fix
Browse files Browse the repository at this point in the history
Signed-off-by: Vedant <[email protected]>
  • Loading branch information
vrnimje committed Sep 8, 2023
1 parent 141101a commit 47b3d93
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions include/quick-ftxui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,14 @@ struct node_printer : boost::static_visitor<> {
It != quick_ftxui_ast::numbers.end()) {
ftxui::SliderOption<int> slider_opt;
slider_opt.value = (int *)(&It->second);
slider_opt.min = text.min, slider_opt.max = text.max, slider_opt.increment = text.increment;
slider_opt.color_active = resolveColour(text.color), slider_opt.color_inactive = ftxui::Color::GrayDark;
slider_opt.min = text.min, slider_opt.max = text.max,
slider_opt.increment = text.increment;
slider_opt.color_active = resolveColour(text.color),
slider_opt.color_inactive = ftxui::Color::GrayDark;
auto sldr = ftxui::Slider<int>(slider_opt);
auto with_label = ftxui::Renderer(sldr, [sldr, &text]{ return ftxui::hbox({ftxui::text(text.label), sldr->Render()}); });
auto with_label = ftxui::Renderer(sldr, [sldr, &text] {
return ftxui::hbox({ftxui::text(text.label), sldr->Render()});
});
data->components.push_back(with_label);
} else {
throw std::runtime_error("Variable " + text.value + " not found");
Expand Down Expand Up @@ -676,9 +680,9 @@ struct parser
input_comp %= qi::lit("Input") >> '{' >> quoted_string >>
-(',' >> inputopt_kw) >> ',' >> identifier >> '}';

slider_comp %= -(color_kw) >> qi::lit("Slider") >> '{' >> quoted_string >> ',' >>
identifier >> ',' >> qi::int_ >> ',' >> qi::int_ >> ',' >>
qi::int_ >> '}';
slider_comp %= -(color_kw) >> qi::lit("Slider") >> '{' >> quoted_string >>
',' >> identifier >> ',' >> qi::int_ >> ',' >> qi::int_ >>
',' >> qi::int_ >> '}';

menu_comp %= qi::lit("Menu") >> '{' >> '[' >> +(quoted_string >> ',') >>
']' >> -(',' >> menuopt_kw) >> ',' >> identifier >> '}';
Expand Down

0 comments on commit 47b3d93

Please sign in to comment.