Skip to content

Commit 97effc2

Browse files
authored
Fix bottom bar wrapping in the tree tab (#4693)
* Set default of treeHeatMapStatSelect to be hidden * Added offset to calculate wrapping * Made sure treeheatmapselect starts shown/hidden depending on which value was loaded for showHeatMap * cleanup the offset calculation
1 parent 419701f commit 97effc2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Classes/TreeTab.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function TreeTabClass:Draw(viewPort, inputEvents)
198198

199199
-- Determine positions if one line of controls doesn't fit in the screen width
200200
local twoLineHeight = 24
201-
if viewPort.width >= 1484 or (viewPort.width >= 1168 and not self.viewer.showHeatMap) then
201+
if viewPort.width >= 1168 + (self.isComparing and 198 or 0) + (self.viewer.showHeatMap and 316 or 0) then
202202
twoLineHeight = 0
203203
self.controls.findTimelessJewel:SetAnchor("LEFT", self.controls.treeSearch, "RIGHT", 8, 0)
204204
if self.controls.powerReportList then
@@ -245,6 +245,7 @@ function TreeTabClass:Draw(viewPort, inputEvents)
245245
end
246246

247247
self.controls.treeHeatMap.state = self.viewer.showHeatMap
248+
self.controls.treeHeatMapStatSelect.shown = self.viewer.showHeatMap
248249
self.controls.treeHeatMapStatSelect.list = self.powerStatList
249250
self.controls.treeHeatMapStatSelect.selIndex = 1
250251
self.controls.treeHeatMapStatSelect:CheckDroppedWidth(true)

0 commit comments

Comments
 (0)