mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
servoshell: Make list of options in <select> prompt scrollable (#36677)
This ensures that the select element is usable when there are a lot of options. Testing: We don't have tests for servoshell. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
632971af26
commit
9dc56d420f
1 changed files with 21 additions and 19 deletions
|
@ -449,6 +449,7 @@ impl Dialog {
|
|||
|
||||
let modal = Modal::new("select_element_picker".into()).area(area);
|
||||
modal.show(ctx, |ui| {
|
||||
egui::ScrollArea::vertical().show(ui, |ui| {
|
||||
for option_or_optgroup in prompt.options() {
|
||||
match &option_or_optgroup {
|
||||
SelectElementOptionOrOptgroup::Option(option) => {
|
||||
|
@ -476,6 +477,7 @@ impl Dialog {
|
|||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
prompt.select(selected_option);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue