Use vscroll_indicator in examples.

This commit is contained in:
ArthurSonzogni
2021-09-26 17:30:41 +02:00
committed by Arthur Sonzogni
parent 535974d291
commit 84287eb217
5 changed files with 35 additions and 27 deletions

View File

@@ -24,7 +24,8 @@ int main(int argc, const char* argv[]) {
}
auto renderer = Renderer(container, [&] {
return container->Render() | frame | size(HEIGHT, LESS_THAN, 10) | border;
return container->Render() | vscroll_indicator | frame |
size(HEIGHT, LESS_THAN, 10) | border;
});
auto screen = ScreenInteractive::FitComponent();

View File

@@ -214,23 +214,25 @@ int main(int argc, const char* argv[]) {
};
auto compiler_renderer = Renderer(compiler_component, [&] {
auto compiler_win = window(text("Compiler"), compiler->Render() | frame);
auto flags_win = window(text("Flags"), flags->Render() | frame);
auto compiler_win = window(text("Compiler"),
compiler->Render() | vscroll_indicator | frame);
auto flags_win =
window(text("Flags"), flags->Render() | vscroll_indicator | frame);
auto executable_win = window(text("Executable:"), executable_->Render());
auto input_win =
window(text("Input"),
hbox({
vbox({
hbox({
text("Add: "),
input_add->Render(),
}) | size(WIDTH, EQUAL, 20) |
size(HEIGHT, EQUAL, 1),
filler(),
}),
separator(),
input->Render() | frame | size(HEIGHT, EQUAL, 3) | flex,
}));
window(text("Input"), hbox({
vbox({
hbox({
text("Add: "),
input_add->Render(),
}) | size(WIDTH, EQUAL, 20) |
size(HEIGHT, EQUAL, 1),
filler(),
}),
separator(),
input->Render() | vscroll_indicator | frame |
size(HEIGHT, EQUAL, 3) | flex,
}));
return vbox({
hbox({
compiler_win,
@@ -240,7 +242,7 @@ int main(int argc, const char* argv[]) {
input_win | size(WIDTH, EQUAL, 60),
}),
filler(),
}) | size(HEIGHT, LESS_THAN, 6),
}) | size(HEIGHT, LESS_THAN, 8),
hflow(render_command()) | flex_grow,
}) |
flex_grow | border;

View File

@@ -18,7 +18,8 @@ int main(int argc, const char* argv[]) {
entries.push_back("Entry " + std::to_string(i));
auto radiobox = Menu(&entries, &selected);
auto renderer = Renderer(radiobox, [&] {
return radiobox->Render() | frame | size(HEIGHT, LESS_THAN, 10) | border;
return radiobox->Render() | vscroll_indicator | frame |
size(HEIGHT, LESS_THAN, 10) | border;
});
auto screen = ScreenInteractive::FitComponent();

View File

@@ -18,7 +18,8 @@ int main(int argc, const char* argv[]) {
entries.push_back("RadioBox " + std::to_string(i));
auto radiobox = Radiobox(&entries, &selected);
auto renderer = Renderer(radiobox, [&] {
return radiobox->Render() | frame | size(HEIGHT, LESS_THAN, 10) | border;
return radiobox->Render() | vscroll_indicator | frame |
size(HEIGHT, LESS_THAN, 10) | border;
});
auto screen = ScreenInteractive::FitComponent();