fix order table padding

This commit is contained in:
tildearrow 2021-12-22 17:53:52 -05:00
parent 1065555576
commit 45f8441f1d

View file

@ -368,11 +368,13 @@ void FurnaceGUI::drawOrders() {
if (!ordersOpen) return;
if (ImGui::Begin("Orders",&ordersOpen)) {
float regionX=ImGui::GetContentRegionAvail().x;
ImVec2 prevSpacing=ImGui::GetStyle().ItemSpacing;
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing,ImVec2(1.0f*dpiScale,1.0f*dpiScale));
ImGui::Columns(2,NULL,false);
ImGui::SetColumnWidth(-1,regionX-24.0f*dpiScale);
if (ImGui::BeginTable("OrdersTable",1+e->getChannelCount(e->song.system),ImGuiTableFlags_ScrollY)) {
ImGui::PushFont(patFont);
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing,prevSpacing);
ImGui::TableSetupScrollFreeze(0,1);
float lineHeight=(ImGui::GetTextLineHeight()+4*dpiScale);
if (e->isPlaying()) {
@ -429,6 +431,7 @@ void FurnaceGUI::drawOrders() {
}
}
}
ImGui::PopStyleVar();
ImGui::PopFont();
ImGui::EndTable();
}