diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2021-06-03 17:26:25 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-06-04 09:02:43 +0100 |
commit | 53099b216ce1100731b487567f060ac534f0d3a6 (patch) | |
tree | 6c091cb6d74e09158fd86a0b702a37b9aa03242a /Userland/Libraries/LibVT/TerminalWidget.h | |
parent | acbd1d14d0ca8ea063a9acaec988913557acd22b (diff) | |
download | serenity-53099b216ce1100731b487567f060ac534f0d3a6.zip |
LibVT: Implement bright color support
Previously, we only used bright colors when the bold attribute was set.
We now have the option to set it via escape sequences. We also needed to
make the bold text behavior optional, as some color schemes do weird
things with it. For example, Solarized uses it for various shades of
gray, so bold green would turn into a light shade of gray.
The following new escape sequences are supported:
- `CSI 90;m` to `CSI 97;m`: set bright foreground color
- `CSI 100;m` to `CSI 107;m`: set bright background color
Diffstat (limited to 'Userland/Libraries/LibVT/TerminalWidget.h')
-rw-r--r-- | Userland/Libraries/LibVT/TerminalWidget.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibVT/TerminalWidget.h b/Userland/Libraries/LibVT/TerminalWidget.h index 5d4307e651..73ef382d69 100644 --- a/Userland/Libraries/LibVT/TerminalWidget.h +++ b/Userland/Libraries/LibVT/TerminalWidget.h @@ -89,7 +89,7 @@ public: GUI::Menu& context_menu() { return *m_context_menu; } - Gfx::Color terminal_color_to_rgb(VT::Color); + constexpr Gfx::Color terminal_color_to_rgb(VT::Color) const; void set_font_and_resize_to_fit(const Gfx::Font&); @@ -164,6 +164,7 @@ private: unsigned m_colors[256]; Gfx::Color m_default_foreground_color; Gfx::Color m_default_background_color; + bool m_show_bold_text_as_bright { true }; String m_color_scheme_name; |