diff --git a/include/views/view_help.hpp b/include/views/view_help.hpp index 53eeb7dc5..85a2db4a2 100644 --- a/include/views/view_help.hpp +++ b/include/views/view_help.hpp @@ -24,6 +24,10 @@ namespace hex { bool hasViewMenuItemEntry() override { return false; } + ImVec2 getMinSize() override { + return ImVec2(400, 300); + } + private: bool m_aboutWindowOpen = false; bool m_patternHelpWindowOpen = false; diff --git a/source/views/view_help.cpp b/source/views/view_help.cpp index e5ff181e9..be06f78f5 100644 --- a/source/views/view_help.cpp +++ b/source/views/view_help.cpp @@ -29,15 +29,34 @@ namespace hex { void ViewHelp::drawAboutPopup() { if (ImGui::BeginPopupModal("About", &this->m_aboutWindowOpen, ImGuiWindowFlags_AlwaysAutoResize)) { - ImGui::Text("ImHex Hex Editor v%s by WerWolv", IMHEX_VERSION); + ImGui::Text("ImHex Hex Editor v%s by WerWolv -", IMHEX_VERSION); #if defined(GIT_BRANCH) && defined(GIT_COMMIT_HASH) - ImGui::Text("%s@%s", GIT_BRANCH, GIT_COMMIT_HASH); + ImGui::SameLine(); + ImGui::TextColored(ImVec4(0.4F, 0.8F, 0.4F, 1.0F), "%s@%s", GIT_BRANCH, GIT_COMMIT_HASH); #endif - ImGui::NewLine(); - ImGui::Text("Source code available on GitHub:"); ImGui::SameLine(); + + + ImGui::TextUnformatted("Source code available on GitHub:"); ImGui::SameLine(); ImGui::TextColored(ImVec4(0.4F, 0.4F, 0.8F, 1.0F), "WerWolv/ImHex "); ImGui::NewLine(); + ImGui::Text("Donations"); + ImGui::Separator(); + + constexpr const char* Links[] = { "https://werwolv.net/donate", "https://www.patreon.com/werwolv", "https://github.com/sponsors/WerWolv" }; + + ImGui::TextWrapped("If you like my work, please consider donating to keep the project going. Thanks a lot <3"); + + ImGui::NewLine(); + + for (auto &link : Links) { + ImGui::TextColored(ImVec4(0.4F, 0.4F, 0.8F, 1.0F), link); ImGui::SameLine(); + ImGui::SetCursorPosX(ImGui::GetWindowWidth() - ImGui::CalcTextSize(" Copy ").x); + if (ImGui::Button((std::string("Copy##") + link).c_str())) + ImGui::SetClipboardText(link); + } + ImGui::NewLine(); + ImGui::Text("Libraries used"); ImGui::Separator(); ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.2F, 0.2F, 0.2F, 0.3F));