summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2020-03-18 22:29:44 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2020-03-18 22:29:44 -0400
commitf3081669e488c54ab4fcae2829ea2f58f082c6e7 (patch)
treed3c83c861f4733e7930e4d7733b059b38404c588 /src/ui
parent12f28d72fa9814bcd9fb2fd5bc4c54fabe93c031 (diff)
add default keymappings when config dne
- message colors are now yellow instead of cyan - there is now a wrapper around keymap hashmap
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/widgets/tui_menu.rs3
-rw-r--r--src/ui/widgets/tui_view.rs3
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/widgets/tui_menu.rs b/src/ui/widgets/tui_menu.rs
index 5ac008b..e862065 100644
--- a/src/ui/widgets/tui_menu.rs
+++ b/src/ui/widgets/tui_menu.rs
@@ -46,6 +46,7 @@ impl TuiCommandMenu {
{
// draw menu
let mut display_vec: Vec<String> = map
+ .as_ref()
.iter()
.map(|(k, v)| format!(" {:?} {}", k, v))
.collect();
@@ -80,7 +81,7 @@ impl TuiCommandMenu {
Event::Input(key) => {
match key {
Key::Esc => return None,
- key => match map.get(&key) {
+ key => match map.as_ref().get(&key) {
Some(CommandKeybind::SimpleKeybind(s)) => {
return Some(s);
}
diff --git a/src/ui/widgets/tui_view.rs b/src/ui/widgets/tui_view.rs
index 7cfe223..3cc630d 100644
--- a/src/ui/widgets/tui_view.rs
+++ b/src/ui/widgets/tui_view.rs
@@ -102,8 +102,7 @@ impl<'a> Widget for TuiView<'a> {
};
let message_style = Style::default()
- .fg(Color::LightCyan)
- .modifier(Modifier::BOLD);
+ .fg(Color::Yellow);
if self.show_bottom_status {
/* draw the bottom status bar */