diff --git a/src/nostalgia/modules/core/src/studio/tilesheeteditor-imgui.cpp b/src/nostalgia/modules/core/src/studio/tilesheeteditor-imgui.cpp index 8a7d54d1..f1db8baa 100644 --- a/src/nostalgia/modules/core/src/studio/tilesheeteditor-imgui.cpp +++ b/src/nostalgia/modules/core/src/studio/tilesheeteditor-imgui.cpp @@ -123,6 +123,7 @@ void TileSheetEditorImGui::draw(turbine::Context*) noexcept { ImGui::SameLine(); ImGui::BeginChild("Controls", ImVec2(m_palViewWidth - 8, paneSize.y), true); { + const auto controlsSize = ImGui::GetContentRegionAvail(); ImGui::BeginChild("ToolBox", ImVec2(m_palViewWidth - 24, 30), true); { const auto btnSz = ImVec2(45, 14); @@ -141,14 +142,14 @@ void TileSheetEditorImGui::draw(turbine::Context*) noexcept { } } ImGui::EndChild(); - const auto ySize = paneSize.y - 36; + const auto ySize = controlsSize.y - 38; // draw palette/color picker - ImGui::BeginChild("Palette", ImVec2(m_palViewWidth - 24, ySize / 2.07f), true); + ImGui::BeginChild("Palette", ImVec2(m_palViewWidth - 24, ySize / 2.f), true); { drawPaletteSelector(); } ImGui::EndChild(); - ImGui::BeginChild("SubSheets", ImVec2(m_palViewWidth - 24, ySize / 2.03f), true); + ImGui::BeginChild("SubSheets", ImVec2(m_palViewWidth - 24, ySize / 2.f), true); { static constexpr auto btnHeight = 18; const auto btnSize = ImVec2(18, btnHeight);