Fixed uneven Push Pop calls in their respective Begin End scopes.

This commit is contained in:
David Salvisberg 2015-07-18 18:07:40 +02:00
parent 0fc409785a
commit 464657e20e
1 changed files with 5 additions and 8 deletions

View File

@ -355,6 +355,8 @@ struct SettingsMenuPrivate
break; break;
} }
ImGui::End(); ImGui::End();
ImGui::PopStyleColor(4);
ImGui::PopStyleVar();
} }
ImGui::Render(); ImGui::Render();
SDL_GL_SwapWindow(window); SDL_GL_SwapWindow(window);
@ -409,9 +411,8 @@ struct SettingsMenuPrivate
} }
ImGui::EndChild(); ImGui::EndChild();
ImGui::PopStyleColor(2);
ImGui::PopStyleVar(); ImGui::PopStyleVar();
ImGui::PopStyleColor();
ImGui::PopStyleColor();
ImGui::Spacing(); ImGui::Spacing();
ImGui::Separator(); ImGui::Separator();
@ -475,9 +476,7 @@ struct SettingsMenuPrivate
ImGui::SetWindowPos(pos); ImGui::SetWindowPos(pos);
result = ImGui::Button(str_id, innerSize); result = ImGui::Button(str_id, innerSize);
ImGui::EndChildFrame(); ImGui::EndChildFrame();
ImGui::PopStyleColor(); ImGui::PopStyleColor(3);
ImGui::PopStyleColor();
ImGui::PopStyleColor();
return result; return result;
} }
@ -487,9 +486,7 @@ struct SettingsMenuPrivate
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImGui::GetStyle().Colors[ImGuiCol_WindowBg]); ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImGui::GetStyle().Colors[ImGuiCol_WindowBg]);
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImGui::GetStyle().Colors[ImGuiCol_WindowBg]); ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImGui::GetStyle().Colors[ImGuiCol_WindowBg]);
ImGui::Button(str_id, size); ImGui::Button(str_id, size);
ImGui::PopStyleColor(); ImGui::PopStyleColor(3);
ImGui::PopStyleColor();
ImGui::PopStyleColor();
} }
void displayGraphicsTab() void displayGraphicsTab()