1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 05:55:00 +00:00

TextEditor: Let's have line numbers starting at 1.

Thanks to Dan for pointing this out on IRC:

<danboid> I see TextEditor still numbers its lines from 0. You're too much of a programmer sometimes kling! :)
<  kling> that might be the most extreme form of "programmer design" I've seen in serenity
This commit is contained in:
Andreas Kling 2019-07-27 21:20:38 +02:00
parent 6a0319697c
commit b98c77229d
2 changed files with 2 additions and 2 deletions

View file

@ -292,7 +292,7 @@ void GTextEditor::paint_event(GPaintEvent& event)
auto ruler_line_rect = ruler_content_rect(i);
painter.draw_text(
ruler_line_rect.shrunken(2, 0),
String::number(i),
String::number(i + 1),
is_current_line ? Font::default_bold_font() : font(),
TextAlignment::CenterRight,
is_current_line ? Color::DarkGray : Color::MidGray);