WoWInterface SVN Portfolio

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/Portfolio/Control
    from Rev 23 to Rev 27
    Reverse comparison

Rev 23 → Rev 27

Dropdown.lua
72,7 → 72,22
-- already anchored to the left
middleTex:SetPoint("RIGHT", rightTex, "LEFT", 0, 0)
 
control.minWidth = option.minWidth or 100
if option.width then
control.width = option.width
 
local leftTex = _G[controlName.."Left"]
local button = _G[controlName.."Button"]
local buttonWidth = leftTex:GetWidth() + 2 -- button offset
 
control:SetWidth(control.width)
button:SetHitRectInsets(-control.width + buttonWidth, 0, 0, 0)
-- TODO: Truncate text if text is smaller than middle width
 
elseif option.minWidth then
control.minWidth = option.minWidth
else
control.minWidth = 100
end
 
-- Setup Frame Text
control:UpdateText()
134,7 → 149,14
local textWidth = fontString:GetStringWidth() + 43 - 14 -- text offset - texture inset
local width = leftWidth + textWidth + rightWidth
 
if self.minWidth and self.minWidth > width then
if self.width then
-- Static Width, do nothing
-- TODO: Truncate text if text is smaller than middle width
if textWidth > buttonWidth then
--fontString:SetWidth(buttonWidth)
fontString:SetPoint("LEFT", leftTex, "RIGHT", 0, 0)
end
elseif self.minWidth and self.minWidth > width then
self:SetWidth(self.minWidth)
--middleTex:SetWidth(self.width - leftWidth - rightWidth)
button:SetHitRectInsets(-self.minWidth + buttonWidth, 0, 0, 0)