1
0
mirror of synced 2025-02-18 19:24:11 +01:00

ui: Fixed various background color issues with the new hex editor view

Closes #533
This commit is contained in:
WerWolv 2022-06-13 23:43:34 +02:00
parent a5d202ffc8
commit 141ee62af9
2 changed files with 7 additions and 3 deletions

View File

@ -662,11 +662,14 @@ namespace hex::plugin::builtin {
if ((byteAddress >= selectionMin && byteAddress <= selectionMax)) {
if (color.has_value())
color = ((ImAlphaBlendColors(color.value(), this->m_selectionColor)) & 0x00FFFFFF) | (this->m_selectionColor & 0xFF000000);
color = (ImAlphaBlendColors(color.value(), this->m_selectionColor)) & 0x00FFFFFF;
else
color = this->m_selectionColor;
}
if (color.has_value())
color = *color | (this->m_selectionColor & 0xFF000000);
return color;
}();

View File

@ -260,8 +260,9 @@ namespace hex::plugin::builtin {
this->drawPatternTooltip(child);
ImGui::PushStyleColor(ImGuiCol_TableRowBg, pattern->getColor());
ImGui::PushStyleColor(ImGuiCol_TableRowBgAlt, pattern->getColor());
auto tooltipColor = (child->getColor() & 0x00FF'FFFF) | 0x7000'0000;
ImGui::PushStyleColor(ImGuiCol_TableRowBg, tooltipColor);
ImGui::PushStyleColor(ImGuiCol_TableRowBgAlt, tooltipColor);
ImGui::EndTable();
ImGui::PopStyleColor(2);
}