CheckButton: accurate vertical alignment (#8083)

This commit is contained in:
hius07
2021-08-17 16:20:41 +03:00
committed by GitHub
parent b3eef2f20b
commit 19f43c47e1
4 changed files with 16 additions and 14 deletions

View File

@@ -1050,6 +1050,10 @@ function TextBoxWidget:getLineHeight()
return self.line_height_px
end
function TextBoxWidget:getBaseline()
return self.line_glyph_baseline
end
function TextBoxWidget:getVisibleHeightRatios()
local low = (self.virtual_line_num - 1) / #self.vertical_string_list
local high = (self.virtual_line_num - 1 + self.lines_per_page) / #self.vertical_string_list