Reenable zoom with scroll
This commit is contained in:
parent
21eac9324f
commit
68876a4257
1 changed files with 8 additions and 2 deletions
10
src/tab.rs
10
src/tab.rs
|
|
@ -872,6 +872,8 @@ pub enum Message {
|
||||||
DndLeave(Location),
|
DndLeave(Location),
|
||||||
WindowDrag,
|
WindowDrag,
|
||||||
WindowToggleMaximize,
|
WindowToggleMaximize,
|
||||||
|
ZoomIn,
|
||||||
|
ZoomOut,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||||
|
|
@ -2447,6 +2449,12 @@ impl Tab {
|
||||||
Message::WindowToggleMaximize => {
|
Message::WindowToggleMaximize => {
|
||||||
commands.push(Command::WindowToggleMaximize);
|
commands.push(Command::WindowToggleMaximize);
|
||||||
}
|
}
|
||||||
|
Message::ZoomIn => {
|
||||||
|
commands.push(Command::Action(Action::ZoomIn));
|
||||||
|
}
|
||||||
|
Message::ZoomOut => {
|
||||||
|
commands.push(Command::Action(Action::ZoomOut));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scroll to top if needed
|
// Scroll to top if needed
|
||||||
|
|
@ -4010,7 +4018,6 @@ pub fn respond_to_scroll_direction(delta: ScrollDelta, modifiers: Modifiers) ->
|
||||||
ScrollDelta::Pixels { y, .. } => y,
|
ScrollDelta::Pixels { y, .. } => y,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*TODO
|
|
||||||
if delta_y > 0.0 {
|
if delta_y > 0.0 {
|
||||||
return Some(Message::ZoomIn);
|
return Some(Message::ZoomIn);
|
||||||
}
|
}
|
||||||
|
|
@ -4018,7 +4025,6 @@ pub fn respond_to_scroll_direction(delta: ScrollDelta, modifiers: Modifiers) ->
|
||||||
if delta_y < 0.0 {
|
if delta_y < 0.0 {
|
||||||
return Some(Message::ZoomOut);
|
return Some(Message::ZoomOut);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue