impr: Slightly modernize hashes view

This commit is contained in:
WerWolv
2025-08-10 20:05:07 +02:00
parent 80003a4843
commit 8c9f3fa569

View File

@@ -158,6 +158,7 @@ namespace hex::plugin::hashes {
ImGui::OpenPopup("##CreateHash");
}
ImGui::SetNextWindowPos(ImGui::GetCursorScreenPos(), ImGuiCond_Always);
ImGui::SetNextWindowSize(scaled({ 400, 0 }), ImGuiCond_Always);
if (ImGui::BeginPopup("##CreateHash")) {
ImGuiExt::InputTextIcon("hex.hashes.view.hashes.hash_name"_lang, ICON_VS_SYMBOL_KEY, m_newHashName);
@@ -248,17 +249,15 @@ namespace hex::plugin::hashes {
else
result = "???";
ImGui::PushItemWidth(-1);
ImGui::InputText("##result", result, ImGuiInputTextFlags_ReadOnly);
ImGui::PopItemWidth();
ImGuiExt::TextFormattedSelectable("{}", result);
ImGui::TableNextColumn();
if (ImGuiExt::IconButton(ICON_VS_OPEN_PREVIEW, ImGui::GetStyleColorVec4(ImGuiCol_Text))) {
if (ImGuiExt::DimmedIconButton(ICON_VS_OPEN_PREVIEW, ImGui::GetStyleColorVec4(ImGuiCol_Text))) {
PopupTextHash::open(function);
}
ImGui::SameLine();
if (ImGuiExt::IconButton(ICON_VS_CHROME_CLOSE, ImGui::GetStyleColorVec4(ImGuiCol_Text))) {
ImGui::SameLine(0, 3_scaled);
if (ImGuiExt::DimmedIconButton(ICON_VS_CHROME_CLOSE, ImGui::GetStyleColorVec4(ImGuiCol_Text))) {
indexToRemove = i;
}