Fix setting contrast on non-touch devices (#4219)

This commit is contained in:
Robert
2018-09-13 13:49:23 +02:00
committed by poire-z
parent a706fde2d7
commit eed3a4b5a2
2 changed files with 31 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ function Button:init()
}
}
if self.preselect then
self:onFocus()
self.frame.invert = true
end
self.dimen = self.frame:getSize()
self[1] = self.frame
@@ -120,11 +120,13 @@ function Button:setIcon(icon)
end
function Button:onFocus()
if self.no_focus then return end
self.frame.invert = true
return true
end
function Button:onUnfocus()
if self.no_focus then return end
self.frame.invert = false
return true
end