Merge pull request #693 from adamharrison/fix-scrollbar-split
Added in check to make sure you can use a scrollbar on a split.
This commit is contained in:
commit
4767ffe58d
|
@ -877,11 +877,11 @@ end
|
||||||
|
|
||||||
function RootView:on_mouse_pressed(button, x, y, clicks)
|
function RootView:on_mouse_pressed(button, x, y, clicks)
|
||||||
local div = self.root_node:get_divider_overlapping_point(x, y)
|
local div = self.root_node:get_divider_overlapping_point(x, y)
|
||||||
if div then
|
local node = self.root_node:get_child_overlapping_point(x, y)
|
||||||
|
if div and (node and not node.active_view:scrollbar_overlaps_point(x, y)) then
|
||||||
self.dragged_divider = div
|
self.dragged_divider = div
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
local node = self.root_node:get_child_overlapping_point(x, y)
|
|
||||||
if node.hovered_scroll_button > 0 then
|
if node.hovered_scroll_button > 0 then
|
||||||
node:scroll_tabs(node.hovered_scroll_button)
|
node:scroll_tabs(node.hovered_scroll_button)
|
||||||
return true
|
return true
|
||||||
|
@ -1028,7 +1028,7 @@ function RootView:on_mouse_moved(x, y, dx, dy)
|
||||||
local tab_index = self.overlapping_node and self.overlapping_node:get_tab_overlapping_point(x, y)
|
local tab_index = self.overlapping_node and self.overlapping_node:get_tab_overlapping_point(x, y)
|
||||||
if self.overlapping_node and self.overlapping_node:get_scroll_button_index(x, y) then
|
if self.overlapping_node and self.overlapping_node:get_scroll_button_index(x, y) then
|
||||||
core.request_cursor("arrow")
|
core.request_cursor("arrow")
|
||||||
elseif div then
|
elseif div and (self.overlapping_node and not self.overlapping_node.active_view:scrollbar_overlaps_point(x, y)) then
|
||||||
core.request_cursor(div.type == "hsplit" and "sizeh" or "sizev")
|
core.request_cursor(div.type == "hsplit" and "sizeh" or "sizev")
|
||||||
elseif tab_index then
|
elseif tab_index then
|
||||||
core.request_cursor("arrow")
|
core.request_cursor("arrow")
|
||||||
|
|
Loading…
Reference in New Issue