mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
LibVT/Kernel: Make VT::Attribute::Flags enum class, use AK EnumBits
Noticed the TODO in `Attribute.h` and realized we have as solution to this problem already. :^)
This commit is contained in:
parent
8601f74d5f
commit
913374163c
4 changed files with 22 additions and 22 deletions
|
@ -342,7 +342,7 @@ void TerminalWidget::paint_event(GUI::PaintEvent& event)
|
|||
auto underline_style = UnderlineStyle::None;
|
||||
auto underline_color = text_color;
|
||||
|
||||
if (attribute.flags & VT::Attribute::Underline) {
|
||||
if (has_flag(attribute.flags, VT::Attribute::Flags::Underline)) {
|
||||
// Content has specified underline
|
||||
underline_style = UnderlineStyle::Solid;
|
||||
} else if (!attribute.href.is_empty()) {
|
||||
|
@ -410,7 +410,7 @@ void TerminalWidget::paint_event(GUI::PaintEvent& event)
|
|||
painter.draw_glyph_or_emoji(
|
||||
character_rect.location(),
|
||||
code_point,
|
||||
attribute.flags & VT::Attribute::Bold ? bold_font : font,
|
||||
has_flag(attribute.flags, VT::Attribute::Flags::Bold) ? bold_font : font,
|
||||
text_color);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue