mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
HexEditor: Replace DeprecatedString in HexEditor.cpp
This commit is contained in:
parent
7a2ad83c07
commit
74d15195a4
Notes:
sideshowbarker
2024-07-17 06:24:08 +09:00
Author: https://github.com/nbvdkamp Commit: https://github.com/SerenityOS/serenity/commit/74d15195a4 Pull-request: https://github.com/SerenityOS/serenity/pull/20605 Reviewed-by: https://github.com/ADKaster ✅
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…
Reference in a new issue