mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibGUI: Implement trailing whitespace visualization in TextEditor
This patch adds an optional mode where TextEditor highlights trailing whitespace characters on each line with a nice reddish dither pattern. We should probably make this themable and I'm sure it could be nicer somehow, but this is just a first cut and I do kinda like it. :^)
This commit is contained in:
parent
08f1ea3e45
commit
aa70d8c217
4 changed files with 52 additions and 0 deletions
|
@ -60,6 +60,9 @@ public:
|
|||
|
||||
virtual void set_document(TextDocument&);
|
||||
|
||||
void set_visualize_trailing_whitespace(bool);
|
||||
bool visualize_trailing_whitespace() const { return m_visualize_trailing_whitespace; }
|
||||
|
||||
bool has_visible_list() const { return m_has_visible_list; }
|
||||
void set_has_visible_list(bool);
|
||||
bool has_open_button() const { return m_has_open_button; }
|
||||
|
@ -274,6 +277,7 @@ private:
|
|||
bool m_line_wrapping_enabled { false };
|
||||
bool m_has_visible_list { false };
|
||||
bool m_has_open_button { false };
|
||||
bool m_visualize_trailing_whitespace { true };
|
||||
int m_line_spacing { 4 };
|
||||
size_t m_soft_tab_width { 4 };
|
||||
int m_horizontal_content_padding { 3 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue