From 8c9f3fa569505ae6fc327cd543233497adfbbad0 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 10 Aug 2025 20:05:07 +0200 Subject: [PATCH] impr: Slightly modernize hashes view --- plugins/hashes/source/content/views/view_hashes.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/plugins/hashes/source/content/views/view_hashes.cpp b/plugins/hashes/source/content/views/view_hashes.cpp index ab4be6804..1476765ba 100644 --- a/plugins/hashes/source/content/views/view_hashes.cpp +++ b/plugins/hashes/source/content/views/view_hashes.cpp @@ -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; }