From 6c858e0c4e950101280724164d80279c0f656c21 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 26 Jan 2025 22:29:14 -0600 Subject: [PATCH] [nostalgia/gfx/studio/tilesheet] UI cleanup --- .../src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp | 7 ++++--- .../src/studio/tilesheeteditor/tilesheeteditor-imgui.hpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp b/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp index d9677cc9..ba6838ab 100644 --- a/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp +++ b/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp @@ -214,7 +214,7 @@ void TileSheetEditorImGui::draw(studio::StudioContext&) noexcept { ImGui::BeginChild("Controls", {s_palViewWidth - 8, paneSize.y}, true); { auto const controlsSize = ImGui::GetContentRegionAvail(); - ImGui::BeginChild("ToolBox", {s_palViewWidth - 24, 30}, true); + ImGui::BeginChild("ToolBox", {168, 32}, true); { auto const btnSz = ImVec2{45, 14}; if (ImGui::Selectable("Select", m_tool == TileSheetTool::Select, 0, btnSz)) { @@ -232,9 +232,10 @@ void TileSheetEditorImGui::draw(studio::StudioContext&) noexcept { } } ImGui::EndChild(); - ImGui::BeginChild("OperationsBox", {s_palViewWidth - 24, ig::BtnSz.y + 17}, true); + ImGui::SameLine(); + ImGui::BeginChild("OperationsBox", {0, 32}, true); { - auto constexpr btnSz = ImVec2{55, ig::BtnSz.y}; + auto constexpr btnSz = ImVec2{55, 16}; if (ig::PushButton("Flip X", btnSz)) { oxLogError(m_model.flipX()); } diff --git a/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.hpp b/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.hpp index d8e3cac8..f338408d 100644 --- a/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.hpp +++ b/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.hpp @@ -45,7 +45,7 @@ class TileSheetEditorImGui: public studio::Editor { [[nodiscard]] constexpr bool isOpen() const noexcept { return m_show; } }; - static constexpr float s_palViewWidth = 300; + static constexpr float s_palViewWidth = 335; studio::StudioContext &m_sctx; turbine::Context &m_tctx; ox::Vector m_paletteList;