refactor(about): simplify dependency licenses

This commit is contained in:
2026-06-18 16:53:59 -05:00
parent 77b2fbe468
commit 70c351a1f1

View File

@@ -467,45 +467,29 @@ void draw_licenses_popup() {
}
if (!ImGui::BeginPopupModal("Licenses and dependencies", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) return;
ImGui::TextUnformatted("Gitree");
ImGui::SameLine();
ImGui::TextDisabled("Creative Commons Attribution-ShareAlike 4.0");
ImGui::TextDisabled("Third-party software included with Gitree:");
ImGui::Spacing();
if (ImGui::BeginTable("dependency_licenses", 2,
ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg | ImGuiTableFlags_SizingFixedFit,
{ui(680), ui(270)})) {
ImGui::TableSetupColumn("Dependency", ImGuiTableColumnFlags_WidthFixed, ui(170));
ImGui::TableSetupColumn("License and source", ImGuiTableColumnFlags_WidthStretch);
ImGui::TableHeadersRow();
if (ImGui::BeginTable("dependency_licenses", 2, ImGuiTableFlags_SizingFixedFit, {ui(510), 0})) {
ImGui::TableSetupColumn("##name", ImGuiTableColumnFlags_WidthFixed, ui(210));
ImGui::TableSetupColumn("##license", ImGuiTableColumnFlags_WidthStretch);
struct Dependency { const char* name; const char* license; const char* url; };
constexpr Dependency dependencies[] = {
{"libgit2 1.9.4", "GPL-2.0 with linking exception", "https://github.com/libgit2/libgit2"},
{"Dear ImGui 1.92.8", "MIT License", "https://github.com/ocornut/imgui"},
{"GLFW 3.4", "zlib/libpng License", "https://github.com/glfw/glfw"},
{"iZo 0.1.0", "MIT License", "https://dock-it.dev/Idea-Studios/iZo"},
{"Gitree", "CC BY-SA 4.0", "https://dock-it.dev/iDENTITY-Technology/Gitree"},
{"libgit2", "GPL-2.0 with linking exception", "https://github.com/libgit2/libgit2"},
{"Dear ImGui", "MIT License", "https://github.com/ocornut/imgui"},
{"GLFW", "zlib/libpng License", "https://github.com/glfw/glfw"},
{"iZo", "MIT License", "https://dock-it.dev/Idea-Studios/iZo"},
{"Inter", "SIL Open Font License 1.1", "https://github.com/rsms/inter"},
{"Font Awesome Free", "SIL Open Font License 1.1", "https://github.com/FortAwesome/Font-Awesome"},
};
for (const auto& dependency : dependencies) {
ImGui::TableNextRow();
ImGui::TableSetColumnIndex(0);
ImGui::TextUnformatted(dependency.name);
external_link(dependency.name, dependency.url);
ImGui::TableSetColumnIndex(1);
ImGui::TextDisabled("%s", dependency.license);
external_link(dependency.url, dependency.url);
}
ImGui::EndTable();
}
ImGui::Spacing();
ImGui::TextDisabled("Complete license texts are included in the source tree with each dependency.");
if (ImGui::Button("Back", {ui(90), 0})) {
g_about_popup = true;
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("Close", {ui(90), 0})) ImGui::CloseCurrentPopup();
ImGui::EndPopup();
}