diff --git a/src/gui/orders.cpp b/src/gui/orders.cpp index 22bd7e0d..fc4972e9 100644 --- a/src/gui/orders.cpp +++ b/src/gui/orders.cpp @@ -39,7 +39,10 @@ void FurnaceGUI::drawOrders() { for (int i=0; igetTotalChannelCount(); i++) { if (e->song.chanShow[i]) displayChans++; } - if (ImGui::BeginTable("OrdersTable",1+displayChans,ImGuiTableFlags_SizingStretchSame|ImGuiTableFlags_ScrollX|ImGuiTableFlags_ScrollY)) { + ImGui::PushFont(patFont); + bool tooSmall=(displayChans>((ImGui::GetWindowSize().x-24.0f*dpiScale)/ImGui::CalcTextSize("AAA").x)); + ImGui::PopFont(); + if (ImGui::BeginTable("OrdersTable",1+displayChans,(tooSmall?ImGuiTableFlags_SizingFixedFit:ImGuiTableFlags_SizingStretchSame)|ImGuiTableFlags_ScrollX|ImGuiTableFlags_ScrollY)) { ImGui::PushFont(patFont); ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing,prevSpacing); ImGui::TableSetupScrollFreeze(1,1); @@ -246,4 +249,4 @@ void FurnaceGUI::drawOrders() { if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_ORDERS; oldOrder1=e->getOrder(); ImGui::End(); -} \ No newline at end of file +}