mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-26 05:14:21 +00:00
small fixes
This commit is contained in:
parent
90483c8833
commit
3e41d97521
@ -157,9 +157,11 @@ function newobject:update(dt)
|
|||||||
if self.bartype == "vertical" then
|
if self.bartype == "vertical" then
|
||||||
self.height = self.parent.height
|
self.height = self.parent.height
|
||||||
self.staticx = self.parent.width - self.width
|
self.staticx = self.parent.width - self.width
|
||||||
|
if parent.hbar then self.height = self.height - parent:GetHorizontalScrollBody().height end
|
||||||
elseif self.bartype == "horizontal" then
|
elseif self.bartype == "horizontal" then
|
||||||
self.width = self.parent.width
|
self.width = self.parent.width
|
||||||
self.staticy = self.parent.height - self.height
|
self.staticy = self.parent.height - self.height
|
||||||
|
if parent.vbar then self.width = self.width - parent:GetVerticalScrollBody().width end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -938,8 +938,9 @@ function newobject:UpdateIndicator()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- indicator should be visible, so correcting scrolls
|
-- indicator should be visible, so correcting scrolls
|
||||||
|
if self.focus then
|
||||||
local indicatorRelativeX = width + self.textoffsetx - self.offsetx
|
local indicatorRelativeX = width + self.textoffsetx - self.offsetx
|
||||||
local leftlimit, rightlimit = 0, self:GetWidth()
|
local leftlimit, rightlimit = 25, self:GetWidth() - 25
|
||||||
if self.linenumberspanel then
|
if self.linenumberspanel then
|
||||||
leftlimit = leftlimit + self:GetLineNumbersPanel().width
|
leftlimit = leftlimit + self:GetLineNumbersPanel().width
|
||||||
end
|
end
|
||||||
@ -970,7 +971,7 @@ function newobject:UpdateIndicator()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local indicatorRelativeY = (line - 1) * theight + self.textoffsety - self.offsety
|
local indicatorRelativeY = (line - 1) * theight + self.textoffsety - self.offsety
|
||||||
local uplimit, downlimit = 0, self:GetHeight()
|
local uplimit, downlimit = 25, self:GetHeight() - 25
|
||||||
if self.hbar then
|
if self.hbar then
|
||||||
downlimit = downlimit - self:GetHorizontalScrollBody().height
|
downlimit = downlimit - self:GetHorizontalScrollBody().height
|
||||||
end
|
end
|
||||||
@ -984,6 +985,7 @@ function newobject:UpdateIndicator()
|
|||||||
vbody:GetScrollBar():ScrollTo((line - 1 + correction)/#lines)
|
vbody:GetScrollBar():ScrollTo((line - 1 + correction)/#lines)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user