Added in mousewheel as part of this.

This commit is contained in:
Adam Harrison
2021-11-14 15:41:28 -05:00
parent c04dc648de
commit 7a3e8ed86a
3 changed files with 10 additions and 12 deletions
+2 -11
View File
@@ -67,17 +67,6 @@ local function get_scale()
return current_scale
end
local on_mouse_wheel = RootView.on_mouse_wheel
function RootView:on_mouse_wheel(d, ...)
if keymap.modkeys["ctrl"] and config.plugins.scale.use_mousewheel then
if d < 0 then command.perform "scale:decrease" end
if d > 0 then command.perform "scale:increase" end
else
return on_mouse_wheel(self, d, ...)
end
end
local function res_scale()
set_scale(default_scale)
end
@@ -101,6 +90,8 @@ keymap.add {
["ctrl+0"] = "scale:reset",
["ctrl+-"] = "scale:decrease",
["ctrl+="] = "scale:increase",
["ctrl+wheelup"] = "scale:increase",
["ctrl+wheeldown"] = "scale:decrease"
}
return {