1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

LibGUI+TextEditor: Add a relative line number option for TextEditor

This adds an option for displaying relative line numbers in the ruler,
the line numbers are still absolute by default.
This commit is contained in:
Snow 2022-12-08 17:07:50 +08:00 committed by Linus Groh
parent 1ca0898b1c
commit 0049dfd717
4 changed files with 31 additions and 1 deletions

View file

@ -97,6 +97,9 @@ public:
void set_editing_cursor();
bool is_relative_line_number() const { return m_relative_line_number; }
void set_relative_line_number(bool);
bool is_ruler_visible() const { return m_ruler_visible; }
void set_ruler_visible(bool);
@ -375,6 +378,7 @@ private:
Gfx::TextAlignment m_text_alignment { Gfx::TextAlignment::CenterLeft };
bool m_cursor_state { true };
bool m_in_drag_select { false };
bool m_relative_line_number { false };
bool m_ruler_visible { false };
bool m_gutter_visible { false };
bool m_needs_rehighlight { false };