Skip to content

Commit

Permalink
Made resize handle a bit bigger.
Browse files Browse the repository at this point in the history
Auto hide/show the resize handle.
  • Loading branch information
Cidan committed Nov 30, 2023
1 parent 85824a7 commit 8bdccb8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions frames/bag.lua
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ function bagFrame:Create(kind)
-- Create the money frame only in the player backpack bag.
if kind == const.BAG_KIND.BACKPACK then
local moneyFrame = money:Create()
moneyFrame.frame:SetPoint("BOTTOMRIGHT", bottomBar, "BOTTOMRIGHT", 0, 0)
moneyFrame.frame:SetPoint("BOTTOMRIGHT", bottomBar, "BOTTOMRIGHT", -10, 0)
moneyFrame.frame:SetParent(b.frame)
b.moneyFrame = moneyFrame
end
Expand Down Expand Up @@ -327,7 +327,7 @@ function bagFrame:Create(kind)
-- Create the bag content frame.
local content = grid:Create(b.frame)
content:GetContainer():SetPoint("TOPLEFT", leftHeader, "BOTTOMLEFT", 3, -3)
content:GetContainer():SetPoint("BOTTOMRIGHT", b.frame, "BOTTOMRIGHT", -3, 3)
content:GetContainer():SetPoint("BOTTOMRIGHT", b.frame, "BOTTOMRIGHT", -3, 30)
content.compactStyle = const.GRID_COMPACT_STYLE.NONE
content:Show()
b.content = content
Expand Down
13 changes: 8 additions & 5 deletions util/resize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function resize:MakeResizable(frame)
local resizeHandle = CreateFrame("Button", nil, frame)
resizeHandle:EnableMouse(true)
resizeHandle:SetPoint("BOTTOMRIGHT")
resizeHandle:SetSize(16, 16)
resizeHandle:SetSize(24, 24)
resizeHandle:SetNormalTexture("Interface\\ChatFrame\\UI-ChatIM-SizeGrabber-Down")
resizeHandle:SetHighlightTexture("Interface\\ChatFrame\\UI-ChatIM-SizeGrabber-Highlight")
resizeHandle:SetPushedTexture("Interface\\ChatFrame\\UI-ChatIM-SizeGrabber-Up")
Expand All @@ -23,8 +23,11 @@ function resize:MakeResizable(frame)
resizeHandle:SetScript("OnMouseUp", function(p)
p:GetParent():StopMovingOrSizing("BOTTOMRIGHT")
end)
resizeHandle:SetScript("OnEnter", function(p)
p:SetAlpha(1)
end)
resizeHandle:SetScript("OnLeave", function(p)
p:SetAlpha(0)
end)
resizeHandle:SetAlpha(0)
end

function resize:HideResize(frame)

end
1 change: 1 addition & 0 deletions views/listview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ function views:ListView(bag, dirtyItems)
h = 40
end
bag.content:ShowScrollBar()
--TODO(lobato): Load this from the database.
bag.frame:SetWidth(600)
bag.frame:SetHeight(700)
end
Expand Down

0 comments on commit 8bdccb8

Please sign in to comment.