mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
LibGUI: Add and use TextEditor::fixed_elements_width()
We were manually adding together the gutter and ruler widths in several places. Soon we'll have a third section that needs to be included in this width, so let's abstract it now.
This commit is contained in:
parent
1a5159df73
commit
54d45d4ac6
2 changed files with 6 additions and 5 deletions
|
@ -274,6 +274,7 @@ protected:
|
|||
Gfx::IntRect content_rect_for_position(TextPosition const&) const;
|
||||
int gutter_width() const;
|
||||
int ruler_width() const;
|
||||
int fixed_elements_width() const { return gutter_width() + ruler_width(); }
|
||||
|
||||
virtual void highlighter_did_set_spans(Vector<TextDocumentSpan> spans) final { document().set_spans(Syntax::HighlighterClient::span_collection_index, move(spans)); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue