GUI: remove use of Columns() in orders
This commit is contained in:
parent
6f8cfa42ea
commit
d8471ce937
|
@ -107,12 +107,16 @@ void FurnaceGUI::drawOrders() {
|
||||||
} else {
|
} else {
|
||||||
//ImGui::SetNextWindowSizeConstraints(ImVec2(440.0f*dpiScale,400.0f*dpiScale),ImVec2(canvasW,canvasH));
|
//ImGui::SetNextWindowSizeConstraints(ImVec2(440.0f*dpiScale,400.0f*dpiScale),ImVec2(canvasW,canvasH));
|
||||||
}
|
}
|
||||||
if (ImGui::Begin("Orders",&ordersOpen,globalWinFlags)) {
|
if (ImGui::Begin("Orders",&ordersOpen,globalWinFlags|ImGuiWindowFlags_NoScrollbar|ImGuiWindowFlags_NoScrollWithMouse)) {
|
||||||
float regionX=ImGui::GetContentRegionAvail().x;
|
if (ImGui::BeginTable("OrdColumn",2,ImGuiTableFlags_BordersInnerV)) {
|
||||||
|
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthStretch);
|
||||||
|
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed);
|
||||||
|
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
ImVec2 prevSpacing=ImGui::GetStyle().ItemSpacing;
|
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::SetColumnWidth(-1,regionX-24.0f*dpiScale);
|
|
||||||
int displayChans=0;
|
int displayChans=0;
|
||||||
for (int i=0; i<e->getTotalChannelCount(); i++) {
|
for (int i=0; i<e->getTotalChannelCount(); i++) {
|
||||||
if (e->curSubSong->chanShow[i]) displayChans++;
|
if (e->curSubSong->chanShow[i]) displayChans++;
|
||||||
|
@ -256,7 +260,7 @@ void FurnaceGUI::drawOrders() {
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
ImGui::NextColumn();
|
ImGui::TableNextColumn();
|
||||||
if (ImGui::Button(ICON_FA_PLUS)) { handleUnimportant
|
if (ImGui::Button(ICON_FA_PLUS)) { handleUnimportant
|
||||||
// add order row (new)
|
// add order row (new)
|
||||||
doAction(GUI_ACTION_ORDERS_ADD);
|
doAction(GUI_ACTION_ORDERS_ADD);
|
||||||
|
@ -343,6 +347,9 @@ void FurnaceGUI::drawOrders() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::PopStyleVar();
|
ImGui::PopStyleVar();
|
||||||
|
|
||||||
|
ImGui::EndTable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_ORDERS;
|
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_ORDERS;
|
||||||
oldOrder1=e->getOrder();
|
oldOrder1=e->getOrder();
|
||||||
|
|
Loading…
Reference in New Issue