bring up description on scroll wheel pressdown, bring up script preview on Right Mouse Button pressdown

This commit is contained in:
nnyyxxxx 2024-11-13 00:05:15 -05:00
parent 093ae2cfb3
commit f41257d55b
No known key found for this signature in database
GPG Key ID: 6038FFD6589902CB

View File

@ -548,21 +548,36 @@ impl AppState {
}
}
}
MouseEventKind::Down(MouseButton::Left) => {
if mouse_in_search {
self.enter_search();
} else if mouse_in_list {
if matches!(self.focus, Focus::Search) {
self.exit_search();
MouseEventKind::Down(button) => match button {
MouseButton::Left => {
if mouse_in_search {
self.enter_search();
} else if mouse_in_list {
if matches!(self.focus, Focus::Search) {
self.exit_search();
}
self.handle_enter();
} else if mouse_in_tab_list {
if matches!(self.focus, Focus::Search) {
self.exit_search();
}
self.focus = Focus::List;
}
self.handle_enter();
} else if mouse_in_tab_list {
if matches!(self.focus, Focus::Search) {
self.exit_search();
}
self.focus = Focus::List;
}
}
MouseButton::Right if mouse_in_list => {
if matches!(self.focus, Focus::Search) {
self.exit_search();
}
self.enable_preview();
}
MouseButton::Middle if mouse_in_list => {
if matches!(self.focus, Focus::Search) {
self.exit_search();
}
self.enable_description();
}
_ => {}
},
MouseEventKind::ScrollDown | MouseEventKind::ScrollUp => {
if matches!(self.focus, Focus::Search) {
self.exit_search();