1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00

LibGUI: Add underlines to highlighting

This commit is contained in:
Oriko 2020-03-12 16:36:25 +02:00 committed by Andreas Kling
parent b58893cfe1
commit 6d89f48dd8
6 changed files with 25 additions and 2 deletions

View file

@ -46,6 +46,7 @@ struct TextDocumentSpan {
Color color;
Optional<Color> background_color;
bool is_skippable { false };
bool is_underlined { false };
const Gfx::Font* font { nullptr };
void* data { nullptr };
};
@ -87,6 +88,7 @@ public:
NonnullOwnPtrVector<TextDocumentLine>& lines() { return m_lines; }
bool has_spans() const { return !m_spans.is_empty(); }
Vector<TextDocumentSpan>& spans() { return m_spans; }
const Vector<TextDocumentSpan>& spans() const { return m_spans; }
void set_span_at_index(size_t index, TextDocumentSpan span) { m_spans[index] = move(span); }