Skip to content

Commit

Permalink
Fixed more alignment issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Cidan committed Dec 2, 2023
1 parent 2e63885 commit 0131286
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 0 additions & 3 deletions frames/bag.lua
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ function bagFrame:Create(kind)
bottomBar:SetPoint("BOTTOMRIGHT", b.frame, "BOTTOMRIGHT", const.OFFSETS.BOTTOM_BAR_RIGHT_INSET, const.OFFSETS.BOTTOM_BAR_BOTTOM_INSET)
bottomBar:SetHeight(20)
bottomBar:Show()
debug:DrawBorder(bottomBar, 0, 1, 0.5)
b.bottomBar = bottomBar

-- Create the money frame only in the player backpack bag.
Expand Down Expand Up @@ -428,8 +427,6 @@ function bagFrame:Create(kind)
database:SetBagViewFrameSize(b.kind, database:GetBagView(b.kind), fw, fh)
end)

debug:DrawBorder(b.content:GetContainer(), 1, 0.5, 0)
--debug:DrawBorder(b.content:GetScrollView(), 0, 1, 0.5)
return b
end

Expand Down
1 change: 0 additions & 1 deletion frames/column.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ function columnFrame:_DoCreate()
column.minimumWidth = 0
column.cells = {}
column.frame:Show()
--debug:DrawBorder(column.frame, 1, 0, 0)
return column
end

Expand Down
5 changes: 4 additions & 1 deletion views/gridview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,8 @@ function views:GridView(bag, dirtyItems)
--TODO(lobato): Implement SafeSetSize that prevents the window from being larger
-- than the screen space.
bag.frame:SetWidth(w + 12)
bag.frame:SetHeight(h + bag.bottomBar:GetHeight())
local bagHeight = h +
const.OFFSETS.BAG_BOTTOM_INSET + -const.OFFSETS.BAG_TOP_INSET +
const.OFFSETS.BOTTOM_BAR_HEIGHT + const.OFFSETS.BOTTOM_BAR_BOTTOM_INSET
bag.frame:SetHeight(bagHeight)
end
5 changes: 4 additions & 1 deletion views/oneview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,8 @@ function views:OneBagView(bag, dirtyItems)
local w, h = bag.content:Draw()
bag.content:HideScrollBar()
bag.frame:SetWidth(w + 12)
bag.frame:SetHeight(h + 28 + bag.bottomBar:GetHeight())
local bagHeight = h +
const.OFFSETS.BAG_BOTTOM_INSET + -const.OFFSETS.BAG_TOP_INSET +
const.OFFSETS.BOTTOM_BAR_HEIGHT + const.OFFSETS.BOTTOM_BAR_BOTTOM_INSET
bag.frame:SetHeight(bagHeight)
end

0 comments on commit 0131286

Please sign in to comment.