From 8e90a3b4209d9a46210480edbaf05ae2ff72b094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Bourdeauducq?= Date: Mon, 20 Jan 2025 21:01:36 +0800 Subject: [PATCH] expand plots --- sndlock.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sndlock.cpp b/sndlock.cpp index 8a8fc82..07412fc 100644 --- a/sndlock.cpp +++ b/sndlock.cpp @@ -438,13 +438,15 @@ int main(int argc, char* argv[]) sprintf(str, "mag scale##%d", i); ImGui::SliderFloat(str, &plot_scale[i], 0.01f, 0.1f); + ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x); { std::lock_guard guard(li_hist_mutex); - sprintf(str, "magnitude##%d", i); + sprintf(str, "##magnitude%d", i); ImGui::PlotLines(str, li_hist_mag[i], HIST_DEPTH, 0, 0, -0.0f, 0.1f*plot_scale[i], ImVec2(0.0f, 200.0f)); - sprintf(str, "phase##%d", i); + sprintf(str, "##phase%d", i); ImGui::PlotLines(str, li_hist_phase[i], HIST_DEPTH, 0, 0, -M_PI, M_PI, ImVec2(0.0f, 200.0f)); } + ImGui::PopItemWidth(); ImGui::Text("values: %8.5f %8.5f rad", (double)li_mag[i], (double)li_phase[i]); } }