Border Bugfix for Buttons
Small visual fix for buttons, when using borders
This commit is contained in:
@@ -60,8 +60,9 @@ return function(name)
|
||||
|
||||
for n = 1, h do
|
||||
if (n == verticalAlign) then
|
||||
self.parent:setText(obx, oby + (n - 1), utils.getTextHorizontalAlign(self:getValue(), w, textHorizontalAlign))
|
||||
self.parent:setFG(obx, oby + (n - 1), utils.getTextHorizontalAlign(tHex[self.fgColor]:rep(self:getValue():len()), w, textHorizontalAlign))
|
||||
local val = self:getValue()
|
||||
self.parent:setText(obx + (w/2-val:len()/2), oby + (n - 1), utils.getTextHorizontalAlign(val, val:len(), textHorizontalAlign))
|
||||
self.parent:setFG(obx + (w/2-val:len()/2), oby + (n - 1), utils.getTextHorizontalAlign(tHex[self.fgColor]:rep(val:len()), val:len(), textHorizontalAlign))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -70,4 +71,4 @@ return function(name)
|
||||
|
||||
}
|
||||
return setmetatable(object, base)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user