From d4d3cb44b94e6bfeba58374d6fabef5ee60cabe3 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 7 May 2022 02:49:56 -0500 Subject: [PATCH] GUI: macro UI refactor, part 2 the macro editor is finally back --- src/gui/insEdit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index 47de22e9..23ca89fc 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -1073,7 +1073,7 @@ void FurnaceGUI::drawMacros(std::vector& macros) { float loopIndicator[256]; int index=0; - float reservedSpace=ImGui::GetContentRegionAvail().x-28.0f*dpiScale; + float reservedSpace=28.0f*dpiScale; if (ImGui::BeginTable("MacroSpace",2)) { ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed,0.0); @@ -1084,6 +1084,7 @@ void FurnaceGUI::drawMacros(std::vector& macros) { ImGui::Dummy(ImVec2(120.0f*dpiScale,dpiScale)); ImGui::TableNextColumn(); float availableWidth=ImGui::GetContentRegionAvail().x-reservedSpace; + printf("aw: %f\n",availableWidth); int totalFit=MIN(128,availableWidth/MAX(1,macroPointSize*dpiScale)); if (macroDragScroll>128-totalFit) { macroDragScroll=128-totalFit;