mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 04:22:28 +00:00
LibSyntax+Libraries: Replace TextStyle with Gfx::TextAttributes
Rather than creating a TextStyle struct, and then copying its fields over to a TextAttributes, let's just create a TextAttributes to start with. This also simplifies the syntax highlighting code by letting us define underlines along with the other text styling.
This commit is contained in:
parent
6d8f046fd0
commit
406a7ea577
Notes:
sideshowbarker
2024-07-17 02:08:15 +09:00
Author: https://github.com/AtkinsSJ
Commit: 406a7ea577
Pull-request: https://github.com/SerenityOS/serenity/pull/17866
10 changed files with 59 additions and 90 deletions
|
@ -15,11 +15,6 @@
|
|||
|
||||
namespace Syntax {
|
||||
|
||||
struct TextStyle {
|
||||
const Gfx::Color color;
|
||||
bool const bold { false };
|
||||
};
|
||||
|
||||
class Highlighter {
|
||||
AK_MAKE_NONCOPYABLE(Highlighter);
|
||||
AK_MAKE_NONMOVABLE(Highlighter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue