Mention that F1 popup can be scrolled

This commit is contained in:
Joscha 2024-01-02 17:17:30 +01:00
parent 2deecc2084
commit b302229d7c
2 changed files with 18 additions and 1 deletions

View file

@ -25,6 +25,7 @@ Procedure when bumping the version number:
- The default euph domain is now https://euphoria.leet.nu/ everywhere
- The config file format was changed to support multiple euph servers with different domains.
Options previously located at `euph.rooms.*` should be reviewed and moved to `euph.servers."euphoria.leet.nu".rooms.*`.
- Tweaked F1 popup
### Fixed
- Room deletion popup accepting any room name

View file

@ -79,7 +79,23 @@ pub fn widget<'a>(
render_group_info(&mut list_builder, group_info);
}
Popup::new(list_builder.build(list), "Key bindings")
let scroll_info_style = Style::new().grey().italic();
let scroll_info = Styled::new("(Scroll with ", scroll_info_style)
.and_then(format_binding(&config.keys.cursor.down))
.then(" and ", scroll_info_style)
.and_then(format_binding(&config.keys.cursor.up))
.then(")", scroll_info_style);
let inner = Join2::vertical(
list_builder.build(list).segment(),
Text::new(scroll_info)
.float()
.with_center_h()
.segment()
.with_growing(false),
);
Popup::new(inner, "Key bindings")
}
pub fn handle_input_event(