I see what are you saying now, what happens if you create your unitbutton like this then?
Lua Code:
self.headers[i]:SetAttribute("style-width", 68)
self.headers[i]:SetAttribute("style-height", 41)
self.headers[i]:SetAttribute("style-scale", 1)
self.headers[i]:SetAttribute("initialConfigFunction", [[
local header = self:GetParent()
self:SetHeight(header:GetAttribute("style-height") * header:GetAttribute("style-scale"))
self:SetWidth(header:GetAttribute("style-width") * header:GetAttribute("style-scale"))
--self:SetScale(header:GetAttribute("style-scale"))
header:CallMethod("initialConfigFunction", self:GetName())
]])
No scale attribute or 1, just setting the width/height multiplied with the scale itself.
Edit:
I think the style-scale attribute is broken too, if you use a simple SetScale on the header that should also get applied on every unit child which will also scale up the unit button's width/height and the offsets will work properly too:
self.headers[i]:SetScale(1)