chore: add zoom on scroll message handling
This commit is contained in:
parent
8900966300
commit
8e74a08704
1 changed files with 12 additions and 0 deletions
12
src/tab.rs
12
src/tab.rs
|
|
@ -828,6 +828,8 @@ pub enum Message {
|
||||||
ZoomDefault,
|
ZoomDefault,
|
||||||
ZoomIn,
|
ZoomIn,
|
||||||
ZoomOut,
|
ZoomOut,
|
||||||
|
ScrollUp,
|
||||||
|
ScrollDown,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||||
|
|
@ -1546,6 +1548,16 @@ impl Tab {
|
||||||
Message::AddNetworkDrive => {
|
Message::AddNetworkDrive => {
|
||||||
commands.push(Command::AddNetworkDrive);
|
commands.push(Command::AddNetworkDrive);
|
||||||
}
|
}
|
||||||
|
Message::ScrollUp => {
|
||||||
|
if mod_ctrl {
|
||||||
|
self.update(Message::ZoomIn, modifiers);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Message::ScrollDown => {
|
||||||
|
if mod_ctrl {
|
||||||
|
self.update(Message::ZoomOut, modifiers);
|
||||||
|
}
|
||||||
|
}
|
||||||
Message::ClickRelease(click_i_opt) => {
|
Message::ClickRelease(click_i_opt) => {
|
||||||
if click_i_opt == self.clicked.take() {
|
if click_i_opt == self.clicked.take() {
|
||||||
return commands;
|
return commands;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue