HexEditor: Make border of offset area straight down

Subtracting 1 from both axes causes a kink in the line, because the
start point isn't also translated. The clip rect prevents us from
painting too far down, so we can just remove the translated() call.
This commit is contained in:
Sam Atkins 2024-02-05 16:27:09 +00:00 committed by Sam Atkins
commit 8b5d2c710b
Notes: sideshowbarker 2024-07-16 23:57:20 +09:00

View file

@ -594,7 +594,7 @@ void HexEditor::paint_event(GUI::PaintEvent& event)
height() - height_occupied_by_horizontal_scrollbar() //(total_rows() * line_height()) + 5
};
painter.fill_rect(offset_clip_rect, palette().ruler());
painter.draw_line(offset_clip_rect.top_right(), offset_clip_rect.bottom_right().translated(-1), palette().ruler_border());
painter.draw_line(offset_clip_rect.top_right(), offset_clip_rect.bottom_right(), palette().ruler_border());
auto margin_and_hex_width = static_cast<int>(offset_margin_width() + m_bytes_per_row * cell_width() + 3 * m_padding);
painter.draw_line({ margin_and_hex_width, 0 },