LibGUI: Add underlines to highlighting

This commit is contained in:
Oriko 2020-03-12 16:36:25 +02:00 committed by Andreas Kling
commit 6d89f48dd8
Notes: sideshowbarker 2024-07-19 08:20:43 +09:00
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); }