Remove message editor cursor when unfocused
This commit is contained in:
parent
cc1a2866eb
commit
1bf4035c57
3 changed files with 12 additions and 4 deletions
|
|
@ -26,6 +26,7 @@ Procedure when bumping the version number:
|
||||||
- The config file format was changed to support multiple euph servers with different domains.
|
- 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.*`.
|
Options previously located at `euph.rooms.*` should be reviewed and moved to `euph.servers."euphoria.leet.nu".rooms.*`.
|
||||||
- Tweaked F1 popup
|
- Tweaked F1 popup
|
||||||
|
- Tweaked chat message editor when nick list is foused
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Room deletion popup accepting any room name
|
- Room deletion popup accepting any room name
|
||||||
|
|
|
||||||
|
|
@ -148,8 +148,12 @@ where
|
||||||
None => TreeBlockId::Bottom,
|
None => TreeBlockId::Bottom,
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO Unhighlighted version when focusing on nick list
|
let widget = widgets::editor::<M>(
|
||||||
let widget = widgets::editor::<M>(indent, &self.context.nick, self.editor);
|
indent,
|
||||||
|
&self.context.nick,
|
||||||
|
self.context.focused,
|
||||||
|
self.editor,
|
||||||
|
);
|
||||||
let widget = Self::predraw(widget, self.context.size, self.widthdb);
|
let widget = Self::predraw(widget, self.context.size, self.widthdb);
|
||||||
let mut block = Block::new(id, widget, false);
|
let mut block = Block::new(id, widget, false);
|
||||||
|
|
||||||
|
|
@ -167,7 +171,6 @@ where
|
||||||
None => TreeBlockId::Bottom,
|
None => TreeBlockId::Bottom,
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO Unhighlighted version when focusing on nick list
|
|
||||||
let widget = widgets::pseudo::<M>(indent, &self.context.nick, self.editor);
|
let widget = widgets::pseudo::<M>(indent, &self.context.nick, self.editor);
|
||||||
let widget = Self::predraw(widget, self.context.size, self.widthdb);
|
let widget = Self::predraw(widget, self.context.size, self.widthdb);
|
||||||
Block::new(id, widget, false)
|
Block::new(id, widget, false)
|
||||||
|
|
|
||||||
|
|
@ -116,10 +116,14 @@ pub fn msg_placeholder(
|
||||||
pub fn editor<'a, M: ChatMsg>(
|
pub fn editor<'a, M: ChatMsg>(
|
||||||
indent: usize,
|
indent: usize,
|
||||||
nick: &str,
|
nick: &str,
|
||||||
|
focus: bool,
|
||||||
editor: &'a mut EditorState,
|
editor: &'a mut EditorState,
|
||||||
) -> Boxed<'a, Infallible> {
|
) -> Boxed<'a, Infallible> {
|
||||||
let (nick, content) = M::edit(nick, editor.text());
|
let (nick, content) = M::edit(nick, editor.text());
|
||||||
let editor = editor.widget().with_highlight(|_| content);
|
let editor = editor
|
||||||
|
.widget()
|
||||||
|
.with_highlight(|_| content)
|
||||||
|
.with_focus(focus);
|
||||||
|
|
||||||
Join5::horizontal(
|
Join5::horizontal(
|
||||||
Seen::new(true).segment().with_fixed(true),
|
Seen::new(true).segment().with_fixed(true),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue