mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:17:35 +00:00
HexEditor: Replace DeprecatedString in HexEditor.cpp
This commit is contained in:
parent
7a2ad83c07
commit
74d15195a4
1 changed files with 4 additions and 3 deletions
|
@ -626,7 +626,7 @@ void HexEditor::paint_event(GUI::PaintEvent& event)
|
|||
};
|
||||
|
||||
bool is_current_line = (m_position / bytes_per_row()) == i;
|
||||
auto line = DeprecatedString::formatted("{:#08X}", i * bytes_per_row());
|
||||
auto line = String::formatted("{:#08X}", i * bytes_per_row()).release_value_but_fixme_should_propagate_errors();
|
||||
painter.draw_text(
|
||||
side_offset_rect,
|
||||
line,
|
||||
|
@ -661,7 +661,7 @@ void HexEditor::paint_event(GUI::PaintEvent& event)
|
|||
};
|
||||
|
||||
u8 const cell_value = m_document->get(byte_position).value;
|
||||
auto line = DeprecatedString::formatted("{:02X}", cell_value);
|
||||
auto line = String::formatted("{:02X}", cell_value).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
Gfx::Color background_color = palette().color(background_role());
|
||||
Gfx::Color text_color = [&]() -> Gfx::Color {
|
||||
|
@ -726,7 +726,8 @@ void HexEditor::paint_event(GUI::PaintEvent& event)
|
|||
}
|
||||
|
||||
painter.fill_rect(text_background_rect, background_color);
|
||||
painter.draw_text(text_display_rect, DeprecatedString::formatted("{:c}", isprint(cell_value) ? cell_value : '.'), Gfx::TextAlignment::TopLeft, text_color);
|
||||
auto character = String::formatted("{:c}", isprint(cell_value) ? cell_value : '.').release_value_but_fixme_should_propagate_errors();
|
||||
painter.draw_text(text_display_rect, character, Gfx::TextAlignment::TopLeft, text_color);
|
||||
|
||||
if (m_edit_mode == EditMode::Text) {
|
||||
if (byte_position == m_position && m_cursor_blink_active) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue