1
0
mirror of synced 2024-11-25 16:20:23 +01:00

impr: Various cleanup

This commit is contained in:
WerWolv 2023-05-13 17:50:16 +02:00
parent 6e5d6810e7
commit 3c4e1b2f27
4 changed files with 4 additions and 5 deletions

View File

@ -580,7 +580,7 @@ namespace hex::plugin::builtin {
auto copyValue = hex::format("#{:02X}{:02X}{:02X}{:02X}", u8(0xFF * (value.Value.x)), u8(0xFF * (value.Value.y)), u8(0xFF * (value.Value.z)), u8(0xFF * (value.Value.w)));
return [value, copyValue] {
ImGui::ColorButton("##inspectorColor", value, ImGuiColorEditFlags_None, ImVec2(ImGui::GetContentRegionAvail().x, ImGui::GetTextLineHeight()));
ImGui::ColorButton("##inspectorColor", value, ImGuiColorEditFlags_None, ImVec2(ImGui::GetColumnWidth(), ImGui::GetTextLineHeight()));
return copyValue;
};
});
@ -594,7 +594,7 @@ namespace hex::plugin::builtin {
auto copyValue = hex::format("#{:02X}{:02X}{:02X}", u8(0xFF * (color.Value.x)), u8(0xFF * (color.Value.y)), u8(0xFF * (color.Value.z)), 0xFF);
return [color, copyValue] {
ImGui::ColorButton("##inspectorColor", color, ImGuiColorEditFlags_None, ImVec2(ImGui::GetContentRegionAvail().x, ImGui::GetTextLineHeight()));
ImGui::ColorButton("##inspectorColor", color, ImGuiColorEditFlags_None, ImVec2(ImGui::GetColumnWidth(), ImGui::GetTextLineHeight()));
return copyValue;
};
});

View File

@ -9,7 +9,6 @@
#include <content/providers/view_provider.hpp>
#include <nlohmann/json.hpp>
#include <cstring>
#include <wolv/io/file.hpp>
#include <wolv/utils/guards.hpp>

View File

@ -196,7 +196,7 @@ namespace hex::plugin::builtin {
} else {
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0, 0));
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
ImGui::SetNextItemWidth(ImGui::GetColumnWidth());
ImGui::SetKeyboardFocusHere();
if (ImGui::InputText("##InspectorLineEditing", this->m_editingValue, ImGuiInputTextFlags_EnterReturnsTrue | ImGuiInputTextFlags_AutoSelectAll)) {
auto bytes = (*editingFunction)(this->m_editingValue, this->m_endian);

View File

@ -199,7 +199,7 @@ namespace hex::plugin::builtin {
}
ImGui::NewLine();
ImGui::TextWrapped("%s", static_cast<const char *>("hex.builtin.view.hashes.hover_info"_lang));
ImGui::InfoTooltip("hex.builtin.view.hashes.hover_info"_lang);
}
ImGui::End();
}