mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 04:55:15 +00:00
Terminal: Use the same cursor rect for active/inactive windows.
This commit is contained in:
parent
6d7f000ffc
commit
04378d9063
Notes:
sideshowbarker
2024-07-19 15:49:58 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/04378d9063f
1 changed files with 3 additions and 4 deletions
|
@ -664,8 +664,7 @@ void Terminal::paint()
|
|||
char ch = line.characters[column];
|
||||
auto character_rect = glyph_rect(row, column);
|
||||
if (!has_only_one_background_color || should_reverse_fill_for_cursor) {
|
||||
auto cell_rect = character_rect;
|
||||
cell_rect.inflate(0, m_line_spacing);
|
||||
auto cell_rect = character_rect.inflated(0, m_line_spacing);
|
||||
painter.fill_rect(cell_rect, lookup_color(should_reverse_fill_for_cursor ? attribute.foreground_color : attribute.background_color));
|
||||
}
|
||||
if (ch == ' ')
|
||||
|
@ -675,8 +674,8 @@ void Terminal::paint()
|
|||
}
|
||||
|
||||
if (!m_in_active_window) {
|
||||
auto cursor_rect = glyph_rect(m_cursor_row, m_cursor_column);
|
||||
painter.draw_rect(cursor_rect, lookup_color(line(m_cursor_row).attributes[m_cursor_column].foreground_color));
|
||||
auto cell_rect = glyph_rect(m_cursor_row, m_cursor_column).inflated(0, m_line_spacing);
|
||||
painter.draw_rect(cell_rect, lookup_color(line(m_cursor_row).attributes[m_cursor_column].foreground_color));
|
||||
}
|
||||
|
||||
line(m_cursor_row).did_paint = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue