fix order table padding
This commit is contained in:
parent
1065555576
commit
45f8441f1d
|
|
@ -368,11 +368,13 @@ void FurnaceGUI::drawOrders() {
|
||||||
if (!ordersOpen) return;
|
if (!ordersOpen) return;
|
||||||
if (ImGui::Begin("Orders",&ordersOpen)) {
|
if (ImGui::Begin("Orders",&ordersOpen)) {
|
||||||
float regionX=ImGui::GetContentRegionAvail().x;
|
float regionX=ImGui::GetContentRegionAvail().x;
|
||||||
|
ImVec2 prevSpacing=ImGui::GetStyle().ItemSpacing;
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing,ImVec2(1.0f*dpiScale,1.0f*dpiScale));
|
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing,ImVec2(1.0f*dpiScale,1.0f*dpiScale));
|
||||||
ImGui::Columns(2,NULL,false);
|
ImGui::Columns(2,NULL,false);
|
||||||
ImGui::SetColumnWidth(-1,regionX-24.0f*dpiScale);
|
ImGui::SetColumnWidth(-1,regionX-24.0f*dpiScale);
|
||||||
if (ImGui::BeginTable("OrdersTable",1+e->getChannelCount(e->song.system),ImGuiTableFlags_ScrollY)) {
|
if (ImGui::BeginTable("OrdersTable",1+e->getChannelCount(e->song.system),ImGuiTableFlags_ScrollY)) {
|
||||||
ImGui::PushFont(patFont);
|
ImGui::PushFont(patFont);
|
||||||
|
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing,prevSpacing);
|
||||||
ImGui::TableSetupScrollFreeze(0,1);
|
ImGui::TableSetupScrollFreeze(0,1);
|
||||||
float lineHeight=(ImGui::GetTextLineHeight()+4*dpiScale);
|
float lineHeight=(ImGui::GetTextLineHeight()+4*dpiScale);
|
||||||
if (e->isPlaying()) {
|
if (e->isPlaying()) {
|
||||||
|
|
@ -429,6 +431,7 @@ void FurnaceGUI::drawOrders() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ImGui::PopStyleVar();
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue