mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-23 01:46:18 +04:00
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
This commit is contained in:
parent
f22e0aa2ae
commit
d6a9c2c0f6
@ -91,6 +91,9 @@ ## Creating a theme
|
|||||||
| `ui.help` | |
|
| `ui.help` | |
|
||||||
| `ui.text` | |
|
| `ui.text` | |
|
||||||
| `ui.text.focus` | |
|
| `ui.text.focus` | |
|
||||||
|
| `ui.info` | |
|
||||||
|
| `ui.info.text` | |
|
||||||
|
| `ui.menu` | |
|
||||||
| `ui.menu.selected` | |
|
| `ui.menu.selected` | |
|
||||||
| `ui.selection` | For selections in the editing area |
|
| `ui.selection` | For selections in the editing area |
|
||||||
| `ui.selection.primary` | |
|
| `ui.selection.primary` | |
|
||||||
|
@ -259,8 +259,11 @@ fn required_size(&mut self, viewport: (u16, u16)) -> Option<(u16, u16)> {
|
|||||||
// TODO: required size should re-trigger when we filter items so we can draw a smaller menu
|
// 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) {
|
fn render(&mut self, area: Rect, surface: &mut Surface, cx: &mut Context) {
|
||||||
let style = cx.editor.theme.get("ui.text");
|
let theme = &cx.editor.theme;
|
||||||
let selected = cx.editor.theme.get("ui.menu.selected");
|
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;
|
let scroll = self.scroll;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user