From 013128699f3941eb45c52cb3be39358ae199134a Mon Sep 17 00:00:00 2001 From: Antonio Lobato Date: Fri, 1 Dec 2023 19:47:07 -0800 Subject: [PATCH] Fixed more alignment issues --- frames/bag.lua | 3 --- frames/column.lua | 1 - views/gridview.lua | 5 ++++- views/oneview.lua | 5 ++++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/frames/bag.lua b/frames/bag.lua index fc8bdb0a..892a27f0 100644 --- a/frames/bag.lua +++ b/frames/bag.lua @@ -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. @@ -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 diff --git a/frames/column.lua b/frames/column.lua index 886e8e85..fbf231f4 100644 --- a/frames/column.lua +++ b/frames/column.lua @@ -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 diff --git a/views/gridview.lua b/views/gridview.lua index e6cd1907..9bad54cd 100644 --- a/views/gridview.lua +++ b/views/gridview.lua @@ -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 \ No newline at end of file diff --git a/views/oneview.lua b/views/oneview.lua index ab71e487..197e3986 100644 --- a/views/oneview.lua +++ b/views/oneview.lua @@ -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 \ No newline at end of file