Implement auto scroll in mouse area, improves performance
This commit is contained in:
parent
5e4d4523f4
commit
b7c9ed8dff
4 changed files with 47 additions and 136 deletions
11
src/app.rs
11
src/app.rs
|
|
@ -305,7 +305,6 @@ pub enum Message {
|
|||
Config(Config),
|
||||
Copy(Option<Entity>),
|
||||
CosmicSettings(&'static str),
|
||||
CursorMoved(Point),
|
||||
Cut(Option<Entity>),
|
||||
Delete(Option<Entity>),
|
||||
DesktopConfig(DesktopConfig),
|
||||
|
|
@ -2329,13 +2328,6 @@ impl Application for App {
|
|||
let contents = ClipboardCopy::new(ClipboardKind::Copy, &paths);
|
||||
return clipboard::write_data(contents);
|
||||
}
|
||||
Message::CursorMoved(pos) => {
|
||||
let entity = self.tab_model.active();
|
||||
return self.update(Message::TabMessage(
|
||||
Some(entity),
|
||||
tab::Message::CursorMoved(pos),
|
||||
));
|
||||
}
|
||||
Message::Cut(entity_opt) => {
|
||||
self.set_cut(entity_opt);
|
||||
let paths = self.selected_paths(entity_opt);
|
||||
|
|
@ -5374,7 +5366,7 @@ impl Application for App {
|
|||
struct TimeSubscription;
|
||||
|
||||
let mut subscriptions = vec![
|
||||
event::listen_with(|event, status, window_id| match event {
|
||||
event::listen_with(|event, status, _window_id| match event {
|
||||
Event::Keyboard(KeyEvent::KeyPressed {
|
||||
key,
|
||||
modifiers,
|
||||
|
|
@ -5408,7 +5400,6 @@ impl Application for App {
|
|||
_ => None,
|
||||
}
|
||||
}
|
||||
Event::Mouse(CursorMoved { position: pos }) => Some(Message::CursorMoved(pos)),
|
||||
_ => None,
|
||||
}),
|
||||
Config::subscription().map(|update| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue