fix: Custom encoding and text padding setting not applying to custom encoding column
Actually fixes #1005
This commit is contained in:
parent
2f04cfd5c6
commit
4da18d3630
@ -213,6 +213,7 @@ namespace hex::plugin::builtin::ui {
|
||||
bool m_upperCaseHex = true;
|
||||
bool m_grayOutZero = true;
|
||||
bool m_showAscii = true;
|
||||
bool m_showCustomEncoding = true;
|
||||
bool m_syncScrolling = false;
|
||||
u32 m_byteCellPadding = 0, m_characterCellPadding = 0;
|
||||
|
||||
|
@ -106,6 +106,7 @@ namespace hex::plugin::builtin::ui {
|
||||
}
|
||||
|
||||
this->m_showAscii = ContentRegistry::Settings::read("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.ascii", 1);
|
||||
this->m_showCustomEncoding = ContentRegistry::Settings::read("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.advanced_decoding", 1);
|
||||
this->m_grayOutZero = ContentRegistry::Settings::read("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.grey_zeros", 1);
|
||||
this->m_upperCaseHex = ContentRegistry::Settings::read("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.uppercase_hex", 1);
|
||||
this->m_selectionColor = ContentRegistry::Settings::read("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.highlight_color", 0x60C08080);
|
||||
@ -535,7 +536,7 @@ namespace hex::plugin::builtin::ui {
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
// Draw Custom encoding column
|
||||
if (this->m_currCustomEncoding.has_value()) {
|
||||
if (this->m_showCustomEncoding && this->m_currCustomEncoding.has_value()) {
|
||||
std::vector<std::pair<u64, CustomEncodingData>> encodingData;
|
||||
u32 offset = 0;
|
||||
do {
|
||||
@ -575,9 +576,9 @@ namespace hex::plugin::builtin::ui {
|
||||
this->drawSelectionFrame(x, y, address, 1, cellStartPos, cellSize);
|
||||
}
|
||||
|
||||
ImGui::PushItemWidth(cellSize.x);
|
||||
auto startPos = ImGui::GetCursorPosX();
|
||||
ImGui::TextFormattedColored(data.color, "{}", data.displayValue);
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::SetCursorPosX(startPos + cellSize.x);
|
||||
|
||||
this->handleSelection(address, data.advance, &bytes[address % this->m_bytesPerRow], cellHovered);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user