mirror of https://github.com/WerWolv/ImHex.git
parent
3592d17c93
commit
038b98eacf
|
@ -499,8 +499,7 @@ namespace hex::ui {
|
|||
|
||||
this->handleSelection(byteAddress, bytesPerCell, &bytes[x * bytesPerCell], cellHovered);
|
||||
|
||||
// Get byte foreground color
|
||||
|
||||
// Set byte foreground color
|
||||
auto popForeground = SCOPE_GUARD { ImGui::PopStyleColor(); };
|
||||
if (foregroundColor.has_value() && m_editingAddress != byteAddress)
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, *foregroundColor);
|
||||
|
@ -554,6 +553,13 @@ namespace hex::ui {
|
|||
this->drawSelectionFrame(x, y, selection, byteAddress, 1, cellStartPos, cellSize, backgroundColor.value());
|
||||
}
|
||||
|
||||
// Set cell foreground color
|
||||
auto popForeground = SCOPE_GUARD { ImGui::PopStyleColor(); };
|
||||
if (foregroundColor.has_value() && m_editingAddress != byteAddress)
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, *foregroundColor);
|
||||
else
|
||||
popForeground.release();
|
||||
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + (m_characterCellPadding * 1_scaled) / 2);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0, 0));
|
||||
ImGui::PushItemWidth(CharacterSize.x);
|
||||
|
|
Loading…
Reference in New Issue