added alt+scrollwheel -> horizontal scrollbar
This commit is contained in:
parent
094cf0cc2c
commit
aa70d3f7e8
|
@ -3,6 +3,7 @@ local config = require "core.config"
|
||||||
local style = require "core.style"
|
local style = require "core.style"
|
||||||
local common = require "core.common"
|
local common = require "core.common"
|
||||||
local Object = require "core.object"
|
local Object = require "core.object"
|
||||||
|
local keymap = require "core.keymap"
|
||||||
|
|
||||||
|
|
||||||
local View = Object:extend()
|
local View = Object:extend()
|
||||||
|
@ -97,7 +98,11 @@ end
|
||||||
|
|
||||||
function View:on_mouse_wheel(y)
|
function View:on_mouse_wheel(y)
|
||||||
if self.scrollable then
|
if self.scrollable then
|
||||||
self.scroll.to.y = self.scroll.to.y + y * -config.mouse_wheel_scroll
|
if keymap.modkeys['alt'] then
|
||||||
|
self.scroll.to.x = self.scroll.to.x + y * -config.mouse_wheel_scroll
|
||||||
|
else
|
||||||
|
self.scroll.to.y = self.scroll.to.y + y * -config.mouse_wheel_scroll
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue