Minor fix to scroll bar

This commit is contained in:
BeniS
2013-02-20 15:03:45 +13:00
parent 3b9acab7a1
commit b61094c053
4 changed files with 11 additions and 8 deletions

View File

@@ -55,9 +55,7 @@ local function updateValueDisplay(widget)
if widget == nil then return end
if widget:getShowValue() then
local valueLabel = widget:getChildById('valueLabel')
local symbol = widget:getSymbol()
valueLabel:setText(widget:getValue() .. (symbol or ''))
widget:setText(widget:getValue() .. (widget:getSymbol() or ''))
end
end
@@ -224,6 +222,11 @@ function UIScrollBar:setOrientation(orientation)
self.orientation = orientation
end
function UIScrollBar:setText(text)
local valueLabel = self:getChildById('valueLabel')
valueLabel:setText(text)
end
function UIScrollBar:onGeometryChange()
updateSlider(self)
end