Well,
the default UI function that actually updates the bag items does this to show+color or hide the border based on the item's rarity:
lua Code:
function ContainerFrame_Update(frame)
local id = frame:GetID();
local name = frame:GetName();
-- (snip)
for i=1, frame.size, 1 do
itemButton = _G[name.."Item"..i];
texture, itemCount, locked, quality, readable, _, _, isFiltered, noValue = GetContainerItemInfo(id, itemButton:GetID());
-- (snip)
if (quality) then
if (quality >= LE_ITEM_QUALITY_COMMON and BAG_ITEM_QUALITY_COLORS[quality]) then
itemButton.IconBorder:Show();
itemButton.IconBorder:SetVertexColor(BAG_ITEM_QUALITY_COLORS[quality].r, BAG_ITEM_QUALITY_COLORS[quality].g, BAG_ITEM_QUALITY_COLORS[quality].b);
else
itemButton.IconBorder:Hide();
end
-- (snip)
else
itemButton.IconBorder:Hide();
end
... and your code just changes the IconBorder texture:
lua Code:
local function skin(frame)
-- (snip)
frame.IconBorder:SetTexture("Interface\\AddOns\\bBag\\border")
-- (snip)
frame.IconBorder:SetHeight(40)
frame.IconBorder:SetWidth(40)
frame.IconBorder:SetAlpha(0)
... but based on this it should never be visible in the first place, since your code sets the alpha (opacity/visibility) to 0 on load and never changes it, the default UI code never touches the alpha, and nothing in your code does anything else with the texture.
Are you sure you don't have any other addons touching your bags?
Place the cursor over a bag item in-game and run this:
Code:
/run local t = GetMouseFocus().IconBorder local r, g, b = t:GetVertexColor() print("Shown?", t:IsShown(), "Alpha", floor(t:GetAlpha() * 100 + 0.5), "R", floor(r * 255 + 0.5), "G", floor(g * 255 + 0.5), "B", floor(b * 255 + 0.5))
If it reports that it's not shown and/or the alpha is 0, but you see a border, then you definitely have something else going on.
If it reports that it is shown and the alpha is greater than 0, try this:
Code:
/run GetMouseFocus().IconBorder:Hide()
Does the border disappear? Again, if not, then you have some other addon interfering.