Sample preview can only be so tall now
This commit is contained in:
parent
f362b1288c
commit
93b87cc65d
|
@ -561,7 +561,14 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
ImVec2 avail=ImGui::GetContentRegionAvail();
|
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;
|
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 availX=avail.x;
|
||||||
int availY=avail.y;
|
int availY=avail.y;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue