mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge pull request #2139 from Hzj-jie/master2
TextWidget should set dirty region in setText function
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
local UIManager = require("ui/uimanager")
|
||||
local Widget = require("ui/widget/widget")
|
||||
local Screen = require("device").screen
|
||||
local RenderText = require("ui/rendertext")
|
||||
@@ -50,6 +51,9 @@ end
|
||||
function TextWidget:setText(text)
|
||||
self.text = text
|
||||
self:updateSize()
|
||||
UIManager:setDirty(self.parent, function()
|
||||
return "partial", self.dimen
|
||||
end)
|
||||
end
|
||||
|
||||
function TextWidget:paintTo(bb, x, y)
|
||||
|
||||
Reference in New Issue
Block a user