From ece59948c3e102dc6a40166cb397bcc6e6f775f7 Mon Sep 17 00:00:00 2001 From: Tobias Christiansen Date: Thu, 20 Jan 2022 19:58:02 +0100 Subject: [PATCH] LibGfx: Expand TextAttributes with more information about underlining This adds a seperate Color to be used for underlines as well as support for different underline styles. --- Userland/Libraries/LibGfx/TextAttributes.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGfx/TextAttributes.h b/Userland/Libraries/LibGfx/TextAttributes.h index cb0efb48b3..e1f7b4850e 100644 --- a/Userland/Libraries/LibGfx/TextAttributes.h +++ b/Userland/Libraries/LibGfx/TextAttributes.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Andreas Kling + * Copyright (c) 2022, Tobias Christiansen * * SPDX-License-Identifier: BSD-2-Clause */ @@ -12,10 +13,18 @@ namespace Gfx { struct TextAttributes { + enum class UnderlineStyle { + Solid, + Wavy + }; + Color color; - Optional background_color; + Optional background_color {}; bool underline { false }; bool bold { false }; + + Optional underline_color {}; + UnderlineStyle underline_style { UnderlineStyle::Solid }; }; }