mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 08:57:47 +00:00
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
This commit is contained in:
parent
acbd1d14d0
commit
53099b216c
5 changed files with 56 additions and 12 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue