mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 05:05:19 -05:00
impr: Better diff view table headers
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"hex.diffing.view.diff.name": "Diffing",
|
||||
"hex.diffing.view.diff.added": "Hinzugefügt",
|
||||
"hex.diffing.view.diff.modified": "Bearbeitet",
|
||||
"hex.diffing.view.diff.provider_a": "Provider A",
|
||||
"hex.diffing.view.diff.provider_b": "Provider B",
|
||||
"hex.diffing.view.diff.provider_a": "Datenquelle A",
|
||||
"hex.diffing.view.diff.provider_b": "Datenquelle B",
|
||||
"hex.diffing.view.diff.removed": "Entfernt"
|
||||
}
|
||||
@@ -7,8 +7,8 @@
|
||||
"hex.diffing.view.diff.name": "Diffing",
|
||||
"hex.diffing.view.diff.added": "Added",
|
||||
"hex.diffing.view.diff.modified": "Modified",
|
||||
"hex.diffing.view.diff.provider_a": "Provider A",
|
||||
"hex.diffing.view.diff.provider_b": "Provider B",
|
||||
"hex.diffing.view.diff.provider_a": "Data Source A",
|
||||
"hex.diffing.view.diff.provider_b": "Data Source B",
|
||||
"hex.diffing.view.diff.changes": "Changes",
|
||||
"hex.diffing.view.diff.removed": "Removed",
|
||||
"hex.diffing.view.diff.algorithm": "Diffing Algorithm",
|
||||
|
||||
@@ -64,6 +64,13 @@ namespace hex::plugin::diffing {
|
||||
auto providers = ImHexApi::Provider::getProviders();
|
||||
auto &providerIndex = column.provider;
|
||||
|
||||
std::erase_if(providers, [&](const prv::Provider *provider) {
|
||||
if (!provider->isAvailable() || !provider->isReadable())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// Get the name of the currently selected provider
|
||||
std::string preview;
|
||||
if (ImHexApi::Provider::isValid() && providerIndex >= 0)
|
||||
@@ -217,8 +224,8 @@ namespace hex::plugin::diffing {
|
||||
|
||||
// Draw the two hex editor columns side by side
|
||||
if (ImGui::BeginTable("##binary_diff", 2, ImGuiTableFlags_None, diffingColumnSize)) {
|
||||
ImGui::TableSetupColumn("hex.diffing.view.diff.provider_a"_lang);
|
||||
ImGui::TableSetupColumn("hex.diffing.view.diff.provider_b"_lang);
|
||||
ImGui::TableSetupColumn(fmt::format(" {}", "hex.diffing.view.diff.provider_a"_lang).c_str());
|
||||
ImGui::TableSetupColumn(fmt::format(" {}", "hex.diffing.view.diff.provider_b"_lang).c_str());
|
||||
ImGui::TableHeadersRow();
|
||||
|
||||
ImGui::BeginDisabled(m_diffTask.isRunning());
|
||||
|
||||
Reference in New Issue
Block a user