chore: add doc link

This commit is contained in:
2025-12-17 03:11:15 +03:00
parent c58ff17289
commit 89888adf8d

View File

@@ -12,56 +12,65 @@ void about_window::render()
return; return;
ImGui::SetNextWindowSize(ImVec2(500, 400), ImGuiCond_FirstUseEver); ImGui::SetNextWindowSize(ImVec2(500, 400), ImGuiCond_FirstUseEver);
if (ImGui::Begin("About clrsync", &m_visible, ImGuiWindowFlags_NoResize)) if (ImGui::Begin("About clrsync", &m_visible, ImGuiWindowFlags_NoResize))
{ {
const float window_width = ImGui::GetContentRegionAvail().x; const float window_width = ImGui::GetContentRegionAvail().x;
ImGui::PushFont(ImGui::GetFont()); ImGui::PushFont(ImGui::GetFont());
const char* title = "clrsync"; const char *title = "clrsync";
const float title_size = ImGui::CalcTextSize(title).x; const float title_size = ImGui::CalcTextSize(title).x;
ImGui::SetCursorPosX((window_width - title_size) * 0.5f); ImGui::SetCursorPosX((window_width - title_size) * 0.5f);
ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f), "%s", title); ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f), "%s", title);
ImGui::PopFont(); ImGui::PopFont();
std::string version = "Version " + clrsync::core::version_string(); std::string version = "Version " + clrsync::core::version_string();
const float version_size = ImGui::CalcTextSize(version.c_str()).x; const float version_size = ImGui::CalcTextSize(version.c_str()).x;
ImGui::SetCursorPosX((window_width - version_size) * 0.5f); ImGui::SetCursorPosX((window_width - version_size) * 0.5f);
ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "%s", version.c_str()); ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "%s", version.c_str());
ImGui::Spacing(); ImGui::Spacing();
ImGui::Separator(); ImGui::Separator();
ImGui::Spacing(); ImGui::Spacing();
ImGui::TextWrapped( ImGui::TextWrapped("A color scheme management tool.");
"A color scheme management tool."
);
ImGui::Spacing(); ImGui::Spacing();
ImGui::Spacing(); ImGui::Spacing();
ImGui::Separator(); ImGui::Separator();
ImGui::Spacing(); ImGui::Spacing();
ImGui::Text("Links:"); ImGui::Text("Links:");
if (ImGui::Button("GitHub Repository", ImVec2(200, 0))) if (ImGui::Button("GitHub Repository", ImVec2(200, 0)))
{ {
#ifdef _WIN32 #ifdef _WIN32
system("start https://github.com/obsqrbtz/clrsync"); system("start https://github.com/obsqrbtz/clrsync");
#elif __APPLE__ #elif __APPLE__
system("open https://github.com/obsqrbtz/clrsync"); system("open https://github.com/obsqrbtz/clrsync");
#else #else
system("xdg-open https://github.com/obsqrbtz/clrsync"); system("xdg-open https://github.com/obsqrbtz/clrsync");
#endif #endif
} }
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("Documentation", ImVec2(200, 0)))
{
#ifdef _WIN32
system("start https://binarygoose.dev/projects/clrsync/overview/");
#elif __APPLE__
system("open https://binarygoose.dev/projects/clrsync/overview/");
#else
system("xdg-open https://binarygoose.dev/projects/clrsync/overview/");
#endif
}
ImGui::Spacing(); ImGui::Spacing();
ImGui::Spacing(); ImGui::Spacing();
ImGui::Separator(); ImGui::Separator();
ImGui::Spacing(); ImGui::Spacing();
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "MIT License"); ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "MIT License");
ImGui::TextWrapped( ImGui::TextWrapped(
"Copyright (c) 2025 Daniel Dada\n\n" "Copyright (c) 2025 Daniel Dada\n\n"
@@ -72,12 +81,11 @@ void about_window::render()
"copies of the Software, and to permit persons to whom the Software is " "copies of the Software, and to permit persons to whom the Software is "
"furnished to do so, subject to the following conditions:\n\n" "furnished to do so, subject to the following conditions:\n\n"
"The above copyright notice and this permission notice shall be included in all " "The above copyright notice and this permission notice shall be included in all "
"copies or substantial portions of the Software." "copies or substantial portions of the Software.");
);
ImGui::Spacing(); ImGui::Spacing();
ImGui::Spacing(); ImGui::Spacing();
const float button_width = 120.0f; const float button_width = 120.0f;
ImGui::SetCursorPosX((window_width - button_width) * 0.5f); ImGui::SetCursorPosX((window_width - button_width) * 0.5f);
if (ImGui::Button("Close", ImVec2(button_width, 0))) if (ImGui::Button("Close", ImVec2(button_width, 0)))