aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorCossonLeo2021-08-28 04:54:24 +0000
committerGitHub2021-08-28 04:54:24 +0000
commitd6a9c2c0f6f4af98146b52d1c886a1ca99d15676 (patch)
tree080bb2d5ff195a2256c060fbab44be5406711dfa /helix-term/src
parentf22e0aa2ae4169851b43d2225e6a43ef36442659 (diff)
Add ui.menu text style (#664)
* add menu text style * add ui.menu.text ui.info ui.info.text to book * change ui.menu.text to ui.menu * fix book's ui.menu
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/ui/menu.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs
index a56cf19b..24dd3e61 100644
--- a/helix-term/src/ui/menu.rs
+++ b/helix-term/src/ui/menu.rs
@@ -259,8 +259,11 @@ impl<T: Item + 'static> Component for Menu<T> {
// TODO: required size should re-trigger when we filter items so we can draw a smaller menu
fn render(&mut self, area: Rect, surface: &mut Surface, cx: &mut Context) {
- let style = cx.editor.theme.get("ui.text");
- let selected = cx.editor.theme.get("ui.menu.selected");
+ let theme = &cx.editor.theme;
+ let style = theme
+ .try_get("ui.menu")
+ .unwrap_or_else(|| theme.get("ui.text"));
+ let selected = theme.get("ui.menu.selected");
let scroll = self.scroll;