From b95e0691a49ae4518418a51fc6232ea7050b9fc3 Mon Sep 17 00:00:00 2001 From: BlastBrothers Date: Wed, 23 Feb 2022 22:56:31 -0500 Subject: [PATCH] Wavetable graph no longer fills the whole window --- src/gui/insEdit.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index cadf209eb..636933da3 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -1555,7 +1555,13 @@ void FurnaceGUI::drawWaveEdit() { } ImGui::PushStyleVar(ImGuiStyleVar_FramePadding,ImVec2(0.0f,0.0f)); - ImVec2 contentRegion=ImGui::GetContentRegionAvail(); //wavetable graph size determined here + + //wavetable graph size determined here + ImVec2 contentRegion=ImGui::GetContentRegionAvail(); + if (ImGui::GetContentRegionAvail().y > (ImGui::GetContentRegionAvail().x / 2.0f)) { + contentRegion=ImVec2(ImGui::GetContentRegionAvail().x,ImGui::GetContentRegionAvail().x / 2.0f); + } + //ImVec2 contentRegion=ImVec2(ImGui::GetContentRegionAvail().x,ImGui::GetContentRegionAvail().x / 2.0f); //wavetable graph size determined here PlotNoLerp("##Waveform",wavePreview,wave->len+1,0,NULL,0,wave->max,contentRegion); if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) { waveDragStart=ImGui::GetItemRectMin();