Skip to content

Commit

Permalink
Fixed a bug with normal textures showing up as squares. (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cidan authored Feb 24, 2024
1 parent 511e722 commit 5280b7f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions frames/item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,16 @@ function itemFrame.itemProto:SetItem(data)
self.button:Show()
end

function itemFrame.itemProto:ResetSize()
self:SetSize(37, 37)
self.button.NormalTexture:SetSize(64, 64)
end

function itemFrame.itemProto:SetSize(width, height)
self.frame:SetSize(width, height)
self.button:SetSize(width, height)
self.button.IconBorder:SetSize(width, height)
self.button.NormalTexture:SetSize(width, height)
self.button.NormalTexture:SetSize(64/width, 64/height)
self.IconQuestTexture:SetSize(width, height)
self.IconTexture:SetSize(width, height)
self.IconOverlay:SetSize(width, height)
Expand Down Expand Up @@ -481,7 +486,7 @@ function itemFrame.itemProto:ClearItem()
self.ilvlText:SetText("")
self.ilvlText:Hide()
self.LockTexture:Hide()
self:SetSize(37, 37)
self:ResetSize()
self.data = nil
self.isFreeSlot = false
self.button.UpgradeIcon:SetShown(false)
Expand Down Expand Up @@ -532,8 +537,6 @@ function itemFrame:_DoCreate()
-- Small fix for missing texture
i.IconOverlay = button['IconOverlay']

p:SetSize(37, 37)
button:SetSize(37, 37)
button:RegisterForDrag("LeftButton")
button:RegisterForClicks("LeftButtonUp", "RightButtonUp")
i.button = button
Expand Down

0 comments on commit 5280b7f

Please sign in to comment.