Skip to content

Commit

Permalink
Improve dynamic positioning of resource checkboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
DanRStevens committed Feb 25, 2025
1 parent daabf9c commit 9f753e4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions appOPHD/UI/Reports/MineReport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,13 @@ MineReport::MineReport() :
add(btnTakeMeThere, {0, 110});

const auto checkBoxOriginY = 170 + fontMediumBold.height() + 10 + 10;
const auto resourceNameHeight = std::max({ResourceImageRectsOre[0].size.y, fontBold.height(), chkResources[0].size().y});
const auto resourceProgressBarHeight = std::max(25, fontBold.height() + constants::MarginTight * 2);
const auto checkBoxSpacingY = resourceNameHeight + resourceProgressBarHeight + constants::Margin + 23;
add(chkResources[0], {0, checkBoxOriginY});
add(chkResources[1], {0, checkBoxOriginY + 70});
add(chkResources[2], {0, checkBoxOriginY + 70 * 2});
add(chkResources[3], {0, checkBoxOriginY + 70 * 3});
add(chkResources[1], {0, checkBoxOriginY + checkBoxSpacingY});
add(chkResources[2], {0, checkBoxOriginY + checkBoxSpacingY * 2});
add(chkResources[3], {0, checkBoxOriginY + checkBoxSpacingY * 3});

// Truck Management Pane
btnAddTruck.size({140, 30});
Expand Down

0 comments on commit 9f753e4

Please sign in to comment.