Sample preview can only be so tall now

This commit is contained in:
BlastBrothers 2022-04-11 21:51:43 -04:00
parent f362b1288c
commit 93b87cc65d
1 changed files with 7 additions and 0 deletions

View File

@ -561,7 +561,14 @@ void FurnaceGUI::drawSampleEdit() {
ImGui::Separator();
ImVec2 avail=ImGui::GetContentRegionAvail();
if(ImGui::GetContentRegionAvail().y > (ImGui::GetContentRegionAvail().x / 2.0f)) {
avail=ImVec2(ImGui::GetContentRegionAvail().x,ImGui::GetContentRegionAvail().x / 2.0f);
}
avail.y-=ImGui::GetFontSize()+ImGui::GetStyle().ItemSpacing.y+ImGui::GetStyle().ScrollbarSize;
if (avail.y < 1.0){ //Prevents crash
avail.y = 1.0;
}
int availX=avail.x;
int availY=avail.y;