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

GTextEditor: Disable the ruler in single-line mode.

Also make it possible to hide the ruler in multi-line mode, if you should
want to do that. :^)
This commit is contained in:
Andreas Kling 2019-03-15 17:54:05 +01:00
parent 1fc283ed7d
commit 7e3673f710
2 changed files with 27 additions and 13 deletions

View file

@ -5,6 +5,7 @@
#include <AK/HashMap.h>
class GScrollBar;
class Painter;
class GTextPosition {
public:
@ -110,6 +111,7 @@ private:
virtual void focusout_event(GEvent&) override;
virtual void timer_event(GTimerEvent&) override;
virtual bool accepts_focus() const override { return true; }
void paint_ruler(Painter&);
class Line {
friend class GTextEditor;
@ -161,6 +163,7 @@ private:
GTextPosition m_cursor;
bool m_cursor_state { true };
bool m_in_drag_select { false };
bool m_ruler_visible { true };
int m_line_spacing { 2 };
int m_soft_tab_width { 4 };
GTextRange m_selection;