mirror of https://github.com/WerWolv/ImHex.git
impr: Better UI for the main about screen page
This commit is contained in:
parent
106c35344b
commit
2fd81c7ffd
|
@ -21,6 +21,14 @@ namespace hex::plugin::builtin {
|
|||
return ImGuiWindowFlags_AlwaysAutoResize;
|
||||
}
|
||||
|
||||
ImVec2 getMinSize() const override {
|
||||
return scaled({ 700, 450 });
|
||||
}
|
||||
|
||||
ImVec2 getMaxSize() const override {
|
||||
return scaled({ 700, 450 });
|
||||
}
|
||||
|
||||
private:
|
||||
void drawAboutPopup();
|
||||
|
||||
|
|
|
@ -126,11 +126,12 @@ namespace hex::plugin::builtin {
|
|||
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGuiExt::BeginSubWindow("Build Information", ImVec2(0, 0), ImGuiChildFlags_AutoResizeX | ImGuiChildFlags_AutoResizeY);
|
||||
ImGuiExt::BeginSubWindow("Build Information", ImVec2(450_scaled, 0), ImGuiChildFlags_AutoResizeX | ImGuiChildFlags_AutoResizeY);
|
||||
{
|
||||
if (ImGui::BeginTable("Information", 1, ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersInner)) {
|
||||
ImGui::TableNextRow();
|
||||
ImGui::Indent();
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
// Draw basic information about ImHex and its version
|
||||
|
@ -171,9 +172,12 @@ namespace hex::plugin::builtin {
|
|||
ImGui::SameLine();
|
||||
|
||||
// Draw a clickable link to the GitHub repository
|
||||
if (ImGuiExt::Hyperlink("WerWolv/ImHex"))
|
||||
if (ImGuiExt::Hyperlink(ICON_VS_LOGO_GITHUB " " "WerWolv/ImHex"))
|
||||
hex::openWebpage("https://github.com/WerWolv/ImHex");
|
||||
}
|
||||
|
||||
ImGui::Unindent();
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
}
|
||||
|
@ -185,9 +189,12 @@ namespace hex::plugin::builtin {
|
|||
// Draw donation links
|
||||
ImGuiExt::Header("hex.builtin.view.help.about.donations"_lang);
|
||||
|
||||
ImGui::PushTextWrapPos(ImGui::GetContentRegionAvail().x * 0.8F);
|
||||
ImGuiExt::TextFormattedWrapped("{}", static_cast<const char *>("hex.builtin.view.help.about.thanks"_lang));
|
||||
ImGui::PopTextWrapPos();
|
||||
if (ImGui::BeginChild("##ThanksWrapper", ImVec2(ImGui::GetContentRegionAvail().x, ImGui::GetTextLineHeightWithSpacing() * 3))) {
|
||||
ImGui::PushTextWrapPos(ImGui::GetContentRegionAvail().x * 0.8F);
|
||||
ImGuiExt::TextFormattedCentered("{}", static_cast<const char *>("hex.builtin.view.help.about.thanks"_lang));
|
||||
ImGui::PopTextWrapPos();
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
||||
ImGui::NewLine();
|
||||
|
||||
|
@ -224,6 +231,8 @@ namespace hex::plugin::builtin {
|
|||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
ImGui::NewLine();
|
||||
}
|
||||
|
||||
void ViewAbout::drawContributorPage() {
|
||||
|
|
Loading…
Reference in New Issue