mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-24 06:01:55 +00:00
feat: mouse hori scrolls
This commit is contained in:
parent
a6e948f1c9
commit
654cd615cf
|
@ -268,6 +268,8 @@ impl FloatContent for FloatingText {
|
|||
match event.kind {
|
||||
MouseEventKind::ScrollDown => self.scroll_down(),
|
||||
MouseEventKind::ScrollUp => self.scroll_up(),
|
||||
MouseEventKind::ScrollLeft => self.scroll_left(),
|
||||
MouseEventKind::ScrollRight => self.scroll_right(),
|
||||
_ => {}
|
||||
}
|
||||
false
|
||||
|
|
|
@ -424,18 +424,24 @@ impl AppState {
|
|||
match &mut self.focus {
|
||||
Focus::TabList => match event.kind {
|
||||
MouseEventKind::ScrollDown => {
|
||||
if self.current_tab.selected().unwrap() != self.tabs.len() - 1 {
|
||||
self.current_tab.select_next();
|
||||
}
|
||||
self.refresh_tab();
|
||||
}
|
||||
MouseEventKind::ScrollUp => {
|
||||
self.current_tab.select_next();
|
||||
if self.current_tab.selected().unwrap() != 0 {
|
||||
self.current_tab.select_previous();
|
||||
}
|
||||
self.refresh_tab();
|
||||
}
|
||||
MouseEventKind::ScrollRight => self.focus = Focus::List,
|
||||
_ => {}
|
||||
},
|
||||
Focus::List => match event.kind {
|
||||
MouseEventKind::ScrollDown => self.selection.select_next(),
|
||||
MouseEventKind::ScrollUp => self.selection.select_previous(),
|
||||
MouseEventKind::ScrollLeft => self.focus = Focus::TabList,
|
||||
_ => {}
|
||||
},
|
||||
Focus::FloatingWindow(float) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user