Skip to content

Commit 0fa18c6

Browse files
committed
Tighten timeless finder popup layout
1 parent 0febeec commit 0fa18c6

1 file changed

Lines changed: 20 additions & 22 deletions

File tree

src/Classes/TreeTab.lua

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,18 +1366,16 @@ function TreeTabClass:BuildTimelessJewelSockets(treeData, selectedSocket)
13661366
end
13671367

13681368
function TreeTabClass:GetTimelessFinderLayout()
1369-
local popupMargin = 40
1370-
local maxPopupWidth = m_max(980, main.screenW - popupMargin)
1371-
local maxPopupHeight = m_max(640, main.screenH - popupMargin)
1369+
local viewPort = main.viewPort or { width = main.screenW or 1018 }
13721370
local layout = {
13731371
popup = {
1374-
width = m_min(1292, maxPopupWidth),
1375-
height = m_min(780, maxPopupHeight),
1372+
width = m_min(1000, viewPort.width - 28),
1373+
height = 658,
13761374
},
13771375
left = {
13781376
labelX = 24,
13791377
inputX = 145,
1380-
inputWidth = 250,
1378+
inputWidth = 200,
13811379
},
13821380
nodeFilters = {
13831381
firstY = 113,
@@ -1386,20 +1384,20 @@ function TreeTabClass:GetTimelessFinderLayout()
13861384
power = {
13871385
y = 186,
13881386
buttonGap = 8,
1389-
buttonWidth = 110,
1387+
buttonWidth = 90,
13901388
},
13911389
addNode = {
13921390
y = 216,
1393-
inputWidth = 250,
1394-
buttonGap = 8,
1395-
addWidth = 50,
1396-
clearWidth = 52,
1391+
inputWidth = 200,
1392+
buttonGap = 10,
1393+
addWidth = 54,
1394+
clearWidth = 24,
13971395
},
13981396
stats = {
13991397
headerY = 262,
14001398
rowY = 287,
14011399
rowHeight = 24,
1402-
maxRows = 17,
1400+
maxRows = 12,
14031401
labelX = 26,
14041402
labelLimit = 50,
14051403
headerOffset = -11,
@@ -1410,14 +1408,14 @@ function TreeTabClass:GetTimelessFinderLayout()
14101408
removeWidth = 18,
14111409
totalMinimumWeightSpacingY = 8,
14121410
columns = {
1413-
weight1 = 299,
1414-
weight2 = 363,
1415-
minimum = 427,
1416-
remove = 491,
1411+
weight1 = 228,
1412+
weight2 = 292,
1413+
minimum = 356,
1414+
remove = 420,
14171415
},
14181416
},
14191417
results = {
1420-
x = 548,
1418+
gapX = 23,
14211419
labelY = 25,
14221420
leagueSelectX = 612,
14231421
leagueSelectY = 23,
@@ -1441,14 +1439,14 @@ function TreeTabClass:GetTimelessFinderLayout()
14411439
layout.stats.tableY = layout.stats.headerY - 4
14421440
layout.stats.tableRight = layout.addNode.clearX + layout.addNode.clearWidth
14431441
layout.stats.tableWidth = layout.stats.tableRight - layout.stats.tableX
1444-
layout.stats.maxRows = m_min(layout.stats.maxRows, m_max(8, m_floor((layout.buttons.y - 36 - layout.stats.totalMinimumWeightSpacingY - layout.stats.tableY - 28) / layout.stats.rowHeight)))
14451442
layout.stats.tableHeight = layout.stats.maxRows * layout.stats.rowHeight + 28
14461443
layout.stats.totalMinimumWeightLabelY = layout.stats.tableY + layout.stats.tableHeight + layout.stats.totalMinimumWeightSpacingY
14471444
layout.stats.totalMinimumWeightInputX = layout.stats.columns.minimum + layout.stats.inputOffset
14481445
layout.stats.totalMinimumWeightInputY = layout.stats.totalMinimumWeightLabelY - 2
1446+
layout.results.x = layout.stats.tableRight + layout.results.gapX
14491447
layout.results.leagueSelectX = layout.results.x + 64
1450-
layout.results.listWidth = layout.popup.width - layout.results.x - 24
1451-
layout.results.tradeButtonX = layout.popup.width - 24 - 170
1448+
layout.results.listWidth = layout.popup.width - layout.results.x - 20
1449+
layout.results.tradeButtonX = layout.results.x + layout.results.listWidth - 170
14521450
layout.results.listHeight = layout.stats.tableY + layout.stats.tableHeight - layout.results.listY
14531451
return layout
14541452
end
@@ -3638,7 +3636,7 @@ function TreeTabClass:OpenTimelessJewelFinderPopup()
36383636
buildMods()
36393637
controls.availableStatLabel = new("LabelControl", {"TOPLEFT", nil, "TOPLEFT"}, {layout.left.labelX, layout.addNode.y + 2, 0, 16}, "^7Add Node Type:")
36403638
controls.availableStatSelect = new("DropDownControl", {"TOPLEFT", nil, "TOPLEFT"}, {layout.left.inputX, layout.addNode.y, layout.addNode.inputWidth, 18}, copyTable(modData, true), nil)
3641-
controls.availableStatSelect.maxDroppedWidth = 760
3639+
controls.availableStatSelect.maxDroppedWidth = 506
36423640
controls.availableStatSelect.enableDroppedWidth = true
36433641
controls.availableStatSelect.controls.scrollBar.enabled = true
36443642
controls.availableStatSelect.tooltipFunc = function(tooltip, mode, index, value)
@@ -3670,7 +3668,7 @@ function TreeTabClass:OpenTimelessJewelFinderPopup()
36703668
tooltip:AddLine(16, "^7Add the selected stat to the list.")
36713669
end
36723670
end
3673-
controls.clearSelectedStats = new("ButtonControl", {"LEFT", controls.addSelectedStat, "RIGHT"}, {layout.addNode.buttonGap, 0, layout.addNode.clearWidth, 18}, "Clear", function()
3671+
controls.clearSelectedStats = new("ButtonControl", {"LEFT", controls.addSelectedStat, "RIGHT"}, {layout.addNode.buttonGap, 0, layout.addNode.clearWidth, 18}, "X", function()
36743672
clearSelectedStats()
36753673
end)
36763674

0 commit comments

Comments
 (0)